From: Junio C Hamano Date: Wed, 22 Feb 2006 06:33:21 +0000 (-0800) Subject: Merge branch 'jc/nostat' X-Git-Tag: v1.3.0-rc1~165 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ee072260dbff6914c24d956bcc2d46882831f1a0;p=git.git Merge branch 'jc/nostat' * 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 --- ee072260dbff6914c24d956bcc2d46882831f1a0 diff --cc Documentation/git-ls-files.txt index 28dc533d,e5a92f47..e813f842 --- a/Documentation/git-ls-files.txt +++ b/Documentation/git-ls-files.txt @@@ -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 ls-files.c index 27059e20,30296fd8..90b289f0 --- a/ls-files.c +++ b/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,