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 <wink@saville.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jan 9, 2025 at 03:42 UTC 30f7414ca17bc675105d3d731a827778d7367b11
1 file changed +6
diff.h
+6
@@ -480,6 +480,12 @@ struct combine_diff_path {
480 char status;
481 unsigned int mode;
482 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 + */
489 char *path;
490 } parent[FLEX_ARRAY];
491 };