@@ -241,32 +241,43 @@ typedef enum {
241241 * Although this is called a "file", it could represent a file, a symbolic
242242 * link, a submodule commit id, or even a tree (although that only if you
243243 * are tracking type changes or ignored/untracked directories).
244- *
245- * The `id` is the `git_oid` of the item. If the entry represents an
246- * absent side of a diff (e.g. the `old_file` of a `GIT_DELTA_ADDED` delta),
247- * then the oid will be zeroes.
248- *
249- * `path` is the NUL-terminated path to the entry relative to the working
250- * directory of the repository.
251- *
252- * `size` is the size of the entry in bytes.
253- *
254- * `flags` is a combination of the `git_diff_flag_t` types
255- *
256- * `mode` is, roughly, the stat() `st_mode` value for the item. This will
257- * be restricted to one of the `git_filemode_t` values.
258- *
259- * The `id_abbrev` represents the known length of the `id` field, when
260- * converted to a hex string. It is generally `GIT_OID_HEXSZ`, unless this
261- * delta was created from reading a patch file, in which case it may be
262- * abbreviated to something reasonable, like 7 characters.
263244 */
264245typedef struct {
246+ /**
247+ * The `git_oid` of the item. If the entry represents an
248+ * absent side of a diff (e.g. the `old_file` of a `GIT_DELTA_ADDED` delta),
249+ * then the oid will be zeroes.
250+ */
265251 git_oid id ;
252+
253+ /**
254+ * The NUL-terminated path to the entry relative to the working
255+ * directory of the repository.
256+ */
266257 const char * path ;
258+
259+ /**
260+ * The size of the entry in bytes.
261+ */
267262 git_object_size_t size ;
263+
264+ /**
265+ * A combination of the `git_diff_flag_t` types
266+ */
268267 uint32_t flags ;
268+
269+ /**
270+ * Roughly, the stat() `st_mode` value for the item. This will
271+ * be restricted to one of the `git_filemode_t` values.
272+ */
269273 uint16_t mode ;
274+
275+ /**
276+ * Represents the known length of the `id` field, when
277+ * converted to a hex string. It is generally `GIT_OID_HEXSZ`, unless this
278+ * delta was created from reading a patch file, in which case it may be
279+ * abbreviated to something reasonable, like 7 characters.
280+ */
270281 uint16_t id_abbrev ;
271282} git_diff_file ;
272283
0 commit comments