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>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2013-07-14 15:35:40 +07:00
committed by Junio C Hamano
parent 15b55ae06a
commit 01a10b0af9
3 changed files with 13 additions and 8 deletions

View 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);