Re: [PATCH v9 1/9] git-clean: refactor git-clean into two phases

2013-05-15 Thread Jiang Xin
2013/5/15 Junio C Hamano : > Jiang Xin writes: > >> 2013/5/15 Junio C Hamano : @@ -242,11 +287,6 @@ int cmd_clean(int argc, const char **argv, const char *prefix) continue; /* Yup, this one exists unmerged */ } -

Re: [PATCH v9 1/9] git-clean: refactor git-clean into two phases

2013-05-15 Thread Junio C Hamano
Jiang Xin writes: > 2013/5/15 Junio C Hamano : >>> @@ -242,11 +287,6 @@ int cmd_clean(int argc, const char **argv, const char >>> *prefix) >>> continue; /* Yup, this one exists unmerged */ >>> } >>> >>> - /* >>> - * we might ha

Re: [PATCH v9 1/9] git-clean: refactor git-clean into two phases

2013-05-14 Thread Jiang Xin
2013/5/15 Junio C Hamano : >> @@ -242,11 +287,6 @@ int cmd_clean(int argc, const char **argv, const char >> *prefix) >> continue; /* Yup, this one exists unmerged */ >> } >> >> - /* >> - * we might have removed this as part of ea

Re: [PATCH v9 1/9] git-clean: refactor git-clean into two phases

2013-05-14 Thread Junio C Hamano
Jiang Xin writes: > +/* > + * Give path as relative to prefix. > + * > + * This function is a combination of path_relative (in quote.c) and > + * relative_path (in path.c) > + */ > +static const char *path_relative(const char *in, const char *prefix) > +{ > +... Hmph. Is it possible to reuse th

[PATCH v9 1/9] git-clean: refactor git-clean into two phases

2013-05-14 Thread Jiang Xin
Before introducing interactive git-clean, refactor git-clean operations into two phases: * hold cleaning items in del_list, * and remove them in a separate loop at the end. We will introduce interactive git-clean between the two phases. The interactive git-clean will show what would be done and