Merge branch 'jx/clean-interactive'
authorJunio C Hamano <gitster@pobox.com>
Mon, 22 Jul 2013 18:24:11 +0000 (22 11:24 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Jul 2013 18:24:11 +0000 (22 11:24 -0700)
Add "interactive" mode to "git clean".

The early part to refactor relative path related helper functions
looked sensible.

* jx/clean-interactive:
  test: run testcases with POSIX absolute paths on Windows
  test: add t7301 for git-clean--interactive
  git-clean: add documentation for interactive git-clean
  git-clean: add ask each interactive action
  git-clean: add select by numbers interactive action
  git-clean: add filter by pattern interactive action
  git-clean: use a git-add-interactive compatible UI
  git-clean: add colors to interactive git-clean
  git-clean: show items of del_list in columns
  git-clean: add support for -i/--interactive
  git-clean: refactor git-clean into two phases
  write_name{_quoted_relative,}(): remove redundant parameters
  quote_path_relative(): remove redundant parameter
  quote.c: substitute path_relative with relative_path
  path.c: refactor relative_path(), not only strip prefix
  test: add test cases for relative_path

1  2 
Documentation/config.txt
builtin/clean.c
builtin/grep.c
builtin/ls-files.c
cache.h
setup.c
wt-status.c

Simple merge
diff --cc builtin/clean.c
@@@ -221,8 -912,9 +912,9 @@@ int cmd_clean(int argc, const char **ar
                struct dir_entry *ent = dir.entries[i];
                int len, pos;
                int matches = 0;
 -              struct cache_entry *ce;
 +              const struct cache_entry *ce;
                struct stat st;
+               const char *rel;
  
                /*
                 * Remove the '/' at the end that directory
diff --cc builtin/grep.c
Simple merge
@@@ -163,15 -167,13 +167,15 @@@ static void show_ce_entry(const char *t
                       find_unique_abbrev(ce->sha1,abbrev),
                       ce_stage(ce));
        }
-       write_name(ce->name, ce_namelen(ce));
+       write_name(ce->name);
        if (debug_mode) {
 -              printf("  ctime: %d:%d\n", ce->ce_ctime.sec, ce->ce_ctime.nsec);
 -              printf("  mtime: %d:%d\n", ce->ce_mtime.sec, ce->ce_mtime.nsec);
 -              printf("  dev: %d\tino: %d\n", ce->ce_dev, ce->ce_ino);
 -              printf("  uid: %d\tgid: %d\n", ce->ce_uid, ce->ce_gid);
 -              printf("  size: %d\tflags: %x\n", ce->ce_size, ce->ce_flags);
 +              const struct stat_data *sd = &ce->ce_stat_data;
 +
 +              printf("  ctime: %d:%d\n", sd->sd_ctime.sec, sd->sd_ctime.nsec);
 +              printf("  mtime: %d:%d\n", sd->sd_mtime.sec, sd->sd_mtime.nsec);
 +              printf("  dev: %d\tino: %d\n", sd->sd_dev, sd->sd_ino);
 +              printf("  uid: %d\tgid: %d\n", sd->sd_uid, sd->sd_gid);
 +              printf("  size: %d\tflags: %x\n", sd->sd_size, ce->ce_flags);
        }
  }
  
diff --cc cache.h
Simple merge
diff --cc setup.c
Simple merge
diff --cc wt-status.c
Simple merge