Commit Diff


commit - 76f4d96c0d35611360f16e50db97eb7066b66ca7
commit + 61cf2aeb409bbc15842d2c850331220a62e858e3
blob - d35246c26f62ef46974c6b88eb99528c7011e75c
blob + f1f5a0c44daa73a9e037d8b419e217364a0672a3
--- got-worktree.5.html
+++ got-worktree.5.html
@@ -78,10 +78,51 @@ A Got <i class="Em">work tree</i> stores a file hierar
       may still need to be updated to match file content stored in the base
       commit.</dd>
   <dt>Flags</dt>
-  <dd>A flags field (intentionally not documented).</dd>
+  <dd>This field contains the length, according to <a class="Xr">strlen(3)</a>,
+      of path data which follows, and the following flags:
+    <dl class="Bl-tag">
+      <dt>STAGE</dt>
+      <dd>Reflects the added, modified, or deleted staged state of a path staged
+          with <code class="Cm">got stage</code>.</dd>
+      <dt>NOT_FLUSHED</dt>
+      <dd>The entry was added to the file index in memory and does not exist in
+          file index data read from disk. This happens to files which are added
+          to the work tree while operations such as <code class="Cm">got
+          checkout</code>, <code class="Cm">got update</code>,
+          <code class="Cm">got cherrypick,</code> <code class="Cm">got
+          backout,</code> <code class="Cm">got rebase,</code> and
+          <code class="Cm">got histedit</code> are in progress. This flag is
+          always cleared before the entry is written to disk.</dd>
+      <dt>NO_BLOB</dt>
+      <dd>The entry's on-disk file's content in the work tree is not based on a
+          blob in the repository. The blob object ID of this entry must be
+          considered invalid. This happens when unversioned files are added with
+          <code class="Cm">got add</code> and when files are added to the work
+          tree by operations such as <code class="Cm">got cherrypick,</code>
+          <code class="Cm">got backout,</code> <code class="Cm">got
+          rebase,</code> and <code class="Cm">got histedit</code>.</dd>
+      <dt>NO_COMMIT</dt>
+      <dd>The entry is not based on a commit in the repository. The commit
+          object ID of this entry must be considered invalid. This happens when
+          unversioned files are added with <code class="Cm">got add</code> and
+          when files are added to the work tree by operations such as
+          <code class="Cm">got cherrypick,</code> <code class="Cm">got
+          backout,</code> <code class="Cm">got rebase,</code> and
+          <code class="Cm">got histedit</code>.</dd>
+      <dt>NO_FILE_ON_DISK</dt>
+      <dd>The entry has no corresponding on-disk file in the work tree. This
+          happens when files are removed with <code class="Cm">got
+          remove</code>.</dd>
+    </dl>
+  </dd>
   <dt>Path data</dt>
   <dd>The path of the entry, relative to the work tree root. Path data is of
       variable length and NUL-padded to a multiple of 8 bytes.</dd>
+  <dt>Staged blob object ID</dt>
+  <dd>The SHA1 hash of a blob object containing file content which has been
+      staged for commit. The hash is stored as binary data. Only present if a
+      file addition or modification has been staged with <code class="Cm">got
+      stage</code>.</dd>
 </dl>
 <p class="Pp">A corrupt or missing file index can be recreated on demand with
     <code class="Cm">got update</code>. When the file index is modified, it is
@@ -133,7 +174,7 @@ A Got <i class="Em">work tree</i> stores a file hierar
 </div>
 <table class="foot">
   <tr>
-    <td class="foot-date">August 5, 2019</td>
+    <td class="foot-date">August 6, 2019</td>
     <td class="foot-os">OpenBSD 6.5</td>
   </tr>
 </table>