Thread (26 messages) read the whole thread 26 messages, 4 authors, 2025-01-14
STALE564d

[PATCH 05/14] diff: add a comment about combine_diff_path.parent.path

From: Jeff King <hidden>
Date: 2025-01-09 08:42:50
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
Signed-off-by: Jeff King <redacted>
---
 diff.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/diff.h b/diff.h
index f5f6ea00fb..60e7db4ad6 100644
--- a/diff.h
+++ b/diff.h
@@ -480,6 +480,12 @@ struct combine_diff_path {
 		char status;
 		unsigned int mode;
 		struct object_id oid;
+		/*
+		 * This per-parent path is filled only when doing a combined
+		 * diff with revs.combined_all_paths set, and only if the path
+		 * differs from the post-image (e.g., a rename or copy).
+		 * Otherwise it is left NULL.
+		 */
 		char *path;
 	} parent[FLEX_ARRAY];
 };
-- 
2.48.0.rc2.413.gc1c80375a3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help