2013/5/22 Junio C Hamano <gitster@xxxxxxxxx>: > Jiang Xin <worldhello.net@xxxxxxxxx> writes: > >> diff --git a/test-path-utils.c b/test-path-utils.c >> index 0092cb..18267 100644 >> --- a/test-path-utils.c >> +++ b/test-path-utils.c >> @@ -1,6 +1,19 @@ >> #include "cache.h" >> #include "string-list.h" >> >> +#define PARSE_ARGV_STRING(var, input) do { \ >> + if (!strcmp(input, "<null>")) { \ >> + var = NULL; \ >> + } else if (!strcmp(input, "<empty>")) { \ >> + var = ""; \ >> + } else if (*input == '<' || *input == '(') { \ >> + fprintf(stderr, "Bad value: %s\n", input); \ >> + return 1; \ >> + } else { \ >> + var = input; \ >> + } \ >> +} while (0) > > Yuck. Why does it have to be a macro like this? I do not think > "because we may return" justifies it. Rewrite patch 01/15 for this, and only patch 01/15 and 02/15 need update. Please review. Jiang Xin (15): test: add test cases for relative_path path.c: refactor relative_path(), not only strip prefix quote.c: remove path_relative, use relative_path instead Refactor quote_path_relative, remove unused params Refactor write_name_quoted_relative, remove unused params git-clean: refactor git-clean into two phases git-clean: add support for -i/--interactive git-clean: show items of del_list in columns git-clean: add colors to interactive git-clean git-clean: use a git-add-interactive compatible UI git-clean: add filter by pattern interactive action git-clean: add select by numbers interactive action git-clean: add ask each interactive action git-clean: add documentation for interactive git-clean test: add t7301 for git-clean--interactive Documentation/config.txt | 21 +- Documentation/git-clean.txt | 71 +++- builtin/clean.c | 778 +++++++++++++++++++++++++++++++++++++++++-- builtin/grep.c | 5 +- builtin/ls-files.c | 16 +- cache.h | 2 +- path.c | 112 +++++-- quote.c | 65 +--- quote.h | 7 +- setup.c | 5 +- t/t0060-path-utils.sh | 23 ++ t/t7301-clean-interactive.sh | 439 ++++++++++++++++++++++++ test-path-utils.c | 27 ++ wt-status.c | 17 +- 14 files changed, 1437 insertions(+), 151 deletions(-) create mode 100755 t/t7301-clean-interactive.sh -- 1.8.3.rc3.368.g7c798dd -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html