summaryrefslogtreecommitdiff
path: root/builtin/rerere.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/rerere.c')
-rw-r--r--builtin/rerere.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/builtin/rerere.c b/builtin/rerere.c
index 642bf35587..67cbfeb152 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,
};
@@ -156,7 +156,17 @@ int cmd_rerere(int argc, const char **argv, const char *prefix)
else if (!strcmp(argv[0], "status"))
for (i = 0; i < merge_rr.nr; i++)
printf("%s\n", merge_rr.items[i].string);
- else if (!strcmp(argv[0], "diff"))
+ else if (!strcmp(argv[0], "remaining")) {
+ rerere_remaining(&merge_rr);
+ for (i = 0; i < merge_rr.nr; i++) {
+ if (merge_rr.items[i].util != RERERE_RESOLVED)
+ printf("%s\n", merge_rr.items[i].string);
+ else
+ /* prepare for later call to
+ * string_list_clear() */
+ merge_rr.items[i].util = NULL;
+ }
+ } else if (!strcmp(argv[0], "diff"))
for (i = 0; i < merge_rr.nr; i++) {
const char *path = merge_rr.items[i].string;
const char *name = (const char *)merge_rr.items[i].util;