summaryrefslogtreecommitdiff
path: root/rerere.h
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martin.von.zweigbergk@gmail.com>2011-02-16 10:47:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-02-16 21:20:50 (GMT)
commitac49f5ca84d82e5b10bc1eb022dfdd9b0e8f7749 (patch)
tree418f03c9befc275a222889dde09610b5e9440cc2 /rerere.h
parent685e9d9145a186a4b2036ecf2be73cc86d99a9b7 (diff)
downloadgit-ac49f5ca84d82e5b10bc1eb022dfdd9b0e8f7749.zip
git-ac49f5ca84d82e5b10bc1eb022dfdd9b0e8f7749.tar.gz
git-ac49f5ca84d82e5b10bc1eb022dfdd9b0e8f7749.tar.bz2
rerere "remaining"
After "rerere" resolves conflicts by reusing old resolution, there would be three kinds of paths with conflict in the index: * paths that have been resolved in the working tree by rerere; * paths that need further work whose resolution could be recorded; * paths that need resolving that rerere won't help. When the user wants a list of paths that need hand-resolving, output from "rerere status" does not help, as it shows only the second category, but the paths in the third category still needs work (rerere only makes sense for regular files that have both our side and their side, and does not help other kinds of conflicts, e.g. "we modified, they deleted"). The new subcommand "rerere remaining" can be used to show both. As opposed to "rerere status", this subcommand also skips printing paths that have been added to the index, since these paths are already resolved and are no longer "remaining". Initial patch provided by Junio. Refactored and modified to skip resolved paths by Martin. Commit message mostly by Junio. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'rerere.h')
-rw-r--r--rerere.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/rerere.h b/rerere.h
index eaa9004..595f49f 100644
--- a/rerere.h
+++ b/rerere.h
@@ -6,11 +6,19 @@
#define RERERE_AUTOUPDATE 01
#define RERERE_NOAUTOUPDATE 02
+/*
+ * Marks paths that have been hand-resolved and added to the
+ * index. Set in the util field of such paths after calling
+ * rerere_remaining.
+ */
+extern void *RERERE_RESOLVED;
+
extern int setup_rerere(struct string_list *, int);
extern int rerere(int);
extern const char *rerere_path(const char *hex, const char *file);
extern int has_rerere_resolution(const char *hex);
extern int rerere_forget(const char **);
+extern int rerere_remaining(struct string_list *);
#define OPT_RERERE_AUTOUPDATE(v) OPT_UYN(0, "rerere-autoupdate", (v), \
"update the index with reused conflict resolution if possible")