summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8b9b0f3)
raw | patch | inline | side by side (parent: 8b9b0f3)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 9 Feb 2006 05:50:18 +0000 (21:50 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 9 Feb 2006 05:54:52 +0000 (21:54 -0800) |
This is not really part of the proposed updates for CE_VALID,
but with this change, ls-files -t shows CE_VALID paths with
lowercase tag letters instead of the usual uppercase. Useful
for checking out what is going on.
Signed-off-by: Junio C Hamano <junkio@cox.net>
but with this change, ls-files -t shows CE_VALID paths with
lowercase tag letters instead of the usual uppercase. Useful
for checking out what is going on.
Signed-off-by: Junio C Hamano <junkio@cox.net>
ls-files.c | patch | blob | history |
diff --git a/ls-files.c b/ls-files.c
index 6af3b091b049d8ded1999405b4da7191f2b36a4c..3f06ece84d3e6844fe068585a6142fd09376ce6b 100644 (file)
--- a/ls-files.c
+++ b/ls-files.c
if (pathspec && !match(pathspec, ce->name, len))
return;
+ if (tag && *tag && (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,
err = lstat(ce->name, &st);
if (show_deleted && err)
show_ce_entry(tag_removed, ce);
- if (show_modified && ce_modified(ce, &st))
+ if (show_modified && ce_modified(ce, &st, 0))
show_ce_entry(tag_modified, ce);
}
}