Merge branch 'jk/shortlog-tolerate-broken-commit'
[gitweb.git] / builtin / rerere.c
index dc1708e6d6de54b5aaec36d5ff4242bd60183f0a..4e51addb3e135465bdb728bb00c5dc3dd53b7c51 100644 (file)
@@ -6,6 +6,7 @@
 #include "rerere.h"
 #include "xdiff/xdiff.h"
 #include "xdiff-interface.h"
+#include "pathspec.h"
 
 static const char * const rerere_usage[] = {
        N_("git rerere [clear | forget path... | status | remaining | diff | gc]"),
@@ -68,11 +69,12 @@ int cmd_rerere(int argc, const char **argv, const char *prefix)
                return rerere(flags);
 
        if (!strcmp(argv[0], "forget")) {
-               const char **pathspec;
+               struct pathspec pathspec;
                if (argc < 2)
                        warning("'git rerere forget' without paths is deprecated");
-               pathspec = get_pathspec(prefix, argv + 1);
-               return rerere_forget(pathspec);
+               parse_pathspec(&pathspec, 0, PATHSPEC_PREFER_CWD,
+                              prefix, argv + 1);
+               return rerere_forget(&pathspec);
        }
 
        fd = setup_rerere(&merge_rr, flags);