Merge branch 'jc/nostat'
authorJunio C Hamano <junkio@cox.net>
Wed, 22 Feb 2006 06:33:21 +0000 (22:33 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 22 Feb 2006 06:33:21 +0000 (22:33 -0800)
* jc/nostat:
  cache_name_compare() compares name and stage, nothing else.
  "assume unchanged" git: documentation.
  ls-files: split "show-valid-bit" into a different option.
  "Assume unchanged" git: --really-refresh fix.
  ls-files: debugging aid for CE_VALID changes.
  "Assume unchanged" git: do not set CE_VALID with --refresh
  "Assume unchanged" git

1  2 
Documentation/git-ls-files.txt
apply.c
cache.h
diff-files.c
diff.c
ls-files.c

@@@ -85,8 -81,12 +86,12 @@@ OPTION
        R::     removed/deleted
        C::     modified/changed
        K::     to be killed
 -      ?       other
 +      ?::     other
  
+ -v::
+       Similar to `-t`, but use lowercase letters for files
+       that are marked as 'always matching index'.
  --full-name::
        When run from a subdirectory, the command usually
        outputs paths relative to the current directory.  This
diff --cc apply.c
Simple merge
diff --cc cache.h
Simple merge
diff --cc diff-files.c
Simple merge
diff --cc diff.c
Simple merge
diff --cc ls-files.c
@@@ -454,9 -445,26 +455,26 @@@ static void show_ce_entry(const char *t
        if (len >= ce_namelen(ce))
                die("git-ls-files: internal error - cache entry not superset of prefix");
  
 -      if (pathspec && !match(pathspec, ce->name, len))
 +      if (pathspec && !match(pathspec, ps_matched, ce->name, len))
                return;
  
+       if (tag && *tag && show_valid_bit &&
+           (ce->ce_flags & htons(CE_VALID))) {
+               static char alttag[4];
+               memcpy(alttag, tag, 3);
+               if (isalpha(tag[0]))
+                       alttag[0] = tolower(tag[0]);
+               else if (tag[0] == '?')
+                       alttag[0] = '!';
+               else {
+                       alttag[0] = 'v';
+                       alttag[1] = tag[0];
+                       alttag[2] = ' ';
+                       alttag[3] = 0;
+               }
+               tag = alttag;
+       }
        if (!show_stage) {
                fputs(tag, stdout);
                write_name_quoted("", 0, ce->name + offset,