Skip to content

Commit 30f7414

Browse files
peffgitster
authored andcommitted
diff: add a comment about combine_diff_path.parent.path
We only fill in the per-parent "path" field when it differs from what's in combine_diff_path.path (and even then only when the option is appropriate). Let's document that. Suggested-by: Wink Saville <[email protected]> Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3a05997 commit 30f7414

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

diff.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,12 @@ struct combine_diff_path {
480480
char status;
481481
unsigned int mode;
482482
struct object_id oid;
483+
/*
484+
* This per-parent path is filled only when doing a combined
485+
* diff with revs.combined_all_paths set, and only if the path
486+
* differs from the post-image (e.g., a rename or copy).
487+
* Otherwise it is left NULL.
488+
*/
483489
char *path;
484490
} parent[FLEX_ARRAY];
485491
};

0 commit comments

Comments
 (0)