On Mon, Oct 04, 2010 at 03:44:24PM +0200, Michael J Gruber wrote: > That way my branch namespace is reasonably clean, and the graph view on > github, e.g., is somewhat meaningful. My tag name space is a bit crowded... This might help you. I don't know. I think the idea is good, but you may need a negative pattern, or multiple patterns... Just a starting point. If I git-branch supported pattern matching and negative pattern, then my "attic/" hidden namespace would be solved. Hmm.. >From 461bd140c71fc242470c08523bc7becefb9aa2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= <pclouds@xxxxxxxxx> Date: Mon, 4 Oct 2010 21:05:54 +0700 Subject: [PATCH] tag: add core.taglist to let user customize "git tag -l" Be default "git tag" alone (or "git tag -l") will list all tags. Let user specify how they want to list in this case via core.taglist --- Documentation/git-tag.txt | 3 ++- builtin/tag.c | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 31c78a8..770d1d8 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -69,7 +69,8 @@ OPTIONS -l <pattern>:: List tags with names that match the given pattern (or all if no pattern is given). - Typing "git tag" without arguments, also lists all tags. + Typing "git tag" without arguments, also lists all tags matched + by core.taglist ('*' if undefined) --contains <commit>:: Only list tags which contain the specified commit. diff --git a/builtin/tag.c b/builtin/tag.c index d311491..33620f6 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -22,6 +22,7 @@ static const char * const git_tag_usage[] = { }; static char signingkey[1000]; +static const char *default_pattern = "*"; struct tag_filter { const char *pattern; @@ -96,7 +97,7 @@ static int list_tags(const char *pattern, int lines, struct tag_filter filter; if (pattern == NULL) - pattern = "*"; + pattern = default_pattern; filter.pattern = pattern; filter.lines = lines; @@ -234,6 +235,10 @@ static int git_tag_config(const char *var, const char *value, void *cb) set_signingkey(value); return 0; } + if (!strcmp(var, "core.taglist")) { + git_config_string(&default_pattern, var, value); + return 0; + } return git_default_config(var, value, cb); } -- 1.7.0.2.445.gcbdb3 -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html