summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc6ebd4)
raw | patch | inline | side by side (parent: dc6ebd4)
author | Arjen Laarhoven <arjen@yaph.org> | |
Fri, 13 Feb 2009 21:53:41 +0000 (22:53 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 14 Feb 2009 01:28:06 +0000 (17:28 -0800) |
The branch color constants have the form COLOR_BRANCH_$category. Rename
them to BRANCH_COLOR_$category as this conveys their meaning better.
Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
them to BRANCH_COLOR_$category as this conveys their meaning better.
Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-branch.c | patch | blob | history |
diff --git a/builtin-branch.c b/builtin-branch.c
index fe139e1f053eabaeb5e51079a9e57fec673c79af..6d241c8eac5372ff4aca259897c01ffeda8eb1dc 100644 (file)
--- a/builtin-branch.c
+++ b/builtin-branch.c
GIT_COLOR_GREEN, /* CURRENT */
};
enum color_branch {
- COLOR_BRANCH_RESET = 0,
- COLOR_BRANCH_PLAIN = 1,
- COLOR_BRANCH_REMOTE = 2,
- COLOR_BRANCH_LOCAL = 3,
- COLOR_BRANCH_CURRENT = 4,
+ BRANCH_COLOR_RESET = 0,
+ BRANCH_COLOR_PLAIN = 1,
+ BRANCH_COLOR_REMOTE = 2,
+ BRANCH_COLOR_LOCAL = 3,
+ BRANCH_COLOR_CURRENT = 4,
};
static enum merge_filter {
static int parse_branch_color_slot(const char *var, int ofs)
{
if (!strcasecmp(var+ofs, "plain"))
- return COLOR_BRANCH_PLAIN;
+ return BRANCH_COLOR_PLAIN;
if (!strcasecmp(var+ofs, "reset"))
- return COLOR_BRANCH_RESET;
+ return BRANCH_COLOR_RESET;
if (!strcasecmp(var+ofs, "remote"))
- return COLOR_BRANCH_REMOTE;
+ return BRANCH_COLOR_REMOTE;
if (!strcasecmp(var+ofs, "local"))
- return COLOR_BRANCH_LOCAL;
+ return BRANCH_COLOR_LOCAL;
if (!strcasecmp(var+ofs, "current"))
- return COLOR_BRANCH_CURRENT;
+ return BRANCH_COLOR_CURRENT;
die("bad config variable '%s'", var);
}
switch (item->kind) {
case REF_LOCAL_BRANCH:
- color = COLOR_BRANCH_LOCAL;
+ color = BRANCH_COLOR_LOCAL;
break;
case REF_REMOTE_BRANCH:
- color = COLOR_BRANCH_REMOTE;
+ color = BRANCH_COLOR_REMOTE;
break;
default:
- color = COLOR_BRANCH_PLAIN;
+ color = BRANCH_COLOR_PLAIN;
break;
}
c = ' ';
if (current) {
c = '*';
- color = COLOR_BRANCH_CURRENT;
+ color = BRANCH_COLOR_CURRENT;
}
if (verbose) {
printf("%c %s%-*s%s %s %s%s\n", c, branch_get_color(color),
maxwidth, item->name,
- branch_get_color(COLOR_BRANCH_RESET),
+ branch_get_color(BRANCH_COLOR_RESET),
find_unique_abbrev(item->commit->object.sha1, abbrev),
stat.buf, sub);
strbuf_release(&stat);
strbuf_release(&subject);
} else {
printf("%c %s%s%s\n", c, branch_get_color(color), item->name,
- branch_get_color(COLOR_BRANCH_RESET));
+ branch_get_color(BRANCH_COLOR_RESET));
}
}