summaryrefslogtreecommitdiff
path: root/rerere.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-07-14 08:35:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-15 17:56:07 (GMT)
commit01a10b0af9f84069f7c96cb4c94e1417cb7139c1 (patch)
treedf433921b409aef13475629a997ab5a0c5120a3c /rerere.c
parent15b55ae06a208dea4d10125d9655a84f5b62d781 (diff)
downloadgit-01a10b0af9f84069f7c96cb4c94e1417cb7139c1.zip
git-01a10b0af9f84069f7c96cb4c94e1417cb7139c1.tar.gz
git-01a10b0af9f84069f7c96cb4c94e1417cb7139c1.tar.bz2
rerere: convert to use parse_pathspec
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'rerere.c')
-rw-r--r--rerere.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/rerere.c b/rerere.c
index 98e3e29..27afbfe 100644
--- a/rerere.c
+++ b/rerere.c
@@ -6,6 +6,7 @@
#include "resolve-undo.h"
#include "ll-merge.h"
#include "attr.h"
+#include "pathspec.h"
#define RESOLVED 0
#define PUNTED 1
@@ -656,7 +657,7 @@ static int rerere_forget_one_path(const char *path, struct string_list *rr)
return 0;
}
-int rerere_forget(const char **pathspec)
+int rerere_forget(struct pathspec *pathspec)
{
int i, fd;
struct string_list conflict = STRING_LIST_INIT_DUP;
@@ -667,12 +668,12 @@ int rerere_forget(const char **pathspec)
fd = setup_rerere(&merge_rr, RERERE_NOAUTOUPDATE);
- unmerge_cache(pathspec);
+ unmerge_cache(pathspec->raw);
find_conflict(&conflict);
for (i = 0; i < conflict.nr; i++) {
struct string_list_item *it = &conflict.items[i];
- if (!match_pathspec(pathspec, it->string, strlen(it->string),
- 0, NULL))
+ if (!match_pathspec_depth(pathspec, it->string, strlen(it->string),
+ 0, NULL))
continue;
rerere_forget_one_path(it->string, &merge_rr);
}