Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v3 1/2] rerere "remaining"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:34

Martin von Zweigbergk [off-list ref] writes:
Junio, I wasn't sure how to handle the sign-off etc, so feel free to
modify those as appropriate.
At this point I think the primary value of the change is your adding
"rerere_remaining()" to only where it matters (i.e. the isolation of the
change) and you should get the credit as the primary author.  Mine was
impossible to read because I contaminated merge_rr in a wrong place and
had to work it around in unrelated codepaths all over the place.

This was much cleaner and easier to read.
quoted hunk
 builtin/rerere.c |   17 +++++++++--
 rerere.c         |   79 +++++++++++++++++++++++++++++++++++++++++++++++-------
 rerere.h         |    8 +++++
 3 files changed, 91 insertions(+), 13 deletions(-)
diff --git a/builtin/rerere.c b/builtin/rerere.c
index 642bf35..7b9fe18 100644
--- a/builtin/rerere.c
+++ b/builtin/rerere.c
@@ -8,7 +8,7 @@
 #include "xdiff-interface.h"
 
 static const char * const rerere_usage[] = {
-	"git rerere [clear | status | diff | gc]",
+	"git rerere [clear | status | remaining | diff | gc]",
 	NULL,
 };
 
@@ -154,9 +154,20 @@ int cmd_rerere(int argc, const char **argv, const char *prefix)
 	} else if (!strcmp(argv[0], "gc"))
 		garbage_collect(&merge_rr);
 	else if (!strcmp(argv[0], "status"))
-		for (i = 0; i < merge_rr.nr; i++)
+		for (i = 0; i < merge_rr.nr; i++) {
 			printf("%s\n", merge_rr.items[i].string);
-	else if (!strcmp(argv[0], "diff"))
+		}
Unnecessary {} around a single printf().  Will clean-up.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help