Thread (1 message) 1 message, 1 author, 2016-10-18

Re: [PATCH v3 4/6] trailer: make args have their own struct

From: Junio C Hamano <hidden>
Date: 2016-10-18 16:05:41

Stefan Beller [off-list ref] writes:
quoted
@@ -29,6 +29,12 @@ struct trailer_item {
        struct list_head list;
        char *token;
        char *value;
+};
+
+struct arg_item {
+       struct list_head list;
+       char *token;
+       char *value;
        struct conf_info conf;
 };
(Unrelated side note:) When first seeing this diff, I assumed the diff
heuristic is going wild, because it doesn't add a full struct.
But on a second closer look, I realize this is the only correct diff,
because we do not account for moved lines from one struct to the
other.
It probably is not "the only" correct diff, as you actually could
shift it the other way by one to three lines.  I am not sure which
one among four possible diff is the easiest to grok, though.  Both
the above (picking the highest possible position) and the below (the
other extreme) are probably easier to read than anything in between.

 struct trailer_item {
+	struct list_head list;
+	char *token;
+	char *value;
+};
+
+struct arg_item {
 	struct list_head list;
 	char *token;
 	char *value;
 	struct conf_info conf;
 };
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help