summaryrefslogtreecommitdiff
path: root/builtin/tag.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-27 21:57:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-27 21:57:13 (GMT)
commit93e8cd8b6ee766b35bfd3913f56ba86d63cb6253 (patch)
tree9a43acef150e5ebce9d4a4ffba708bd23c05b63e /builtin/tag.c
parenta411726930a6fc97d5a1f62d8d8d59b8587b10f2 (diff)
parent44a6b6ce1777f587c318008fe59b901a296f5326 (diff)
downloadgit-93e8cd8b6ee766b35bfd3913f56ba86d63cb6253.zip
git-93e8cd8b6ee766b35bfd3913f56ba86d63cb6253.tar.gz
git-93e8cd8b6ee766b35bfd3913f56ba86d63cb6253.tar.bz2
Merge branch 'kn/ref-filter-branch-list'
The code to list branches in "git branch" has been consolidated with the more generic ref-filter API. * kn/ref-filter-branch-list: (21 commits) ref-filter: resurrect "strip" as a synonym to "lstrip" branch: implement '--format' option branch: use ref-filter printing APIs branch, tag: use porcelain output ref-filter: allow porcelain to translate messages in the output ref-filter: add an 'rstrip=<N>' option to atoms which deal with refnames ref-filter: modify the 'lstrip=<N>' option to work with negative '<N>' ref-filter: Do not abruptly die when using the 'lstrip=<N>' option ref-filter: rename the 'strip' option to 'lstrip' ref-filter: make remote_ref_atom_parser() use refname_atom_parser_internal() ref-filter: introduce refname_atom_parser() ref-filter: introduce refname_atom_parser_internal() ref-filter: make "%(symref)" atom work with the ':short' modifier ref-filter: add support for %(upstream:track,nobracket) ref-filter: make %(upstream:track) prints "[gone]" for invalid upstreams ref-filter: introduce format_ref_array_item() ref-filter: move get_head_description() from branch.c ref-filter: modify "%(objectname:short)" to take length ref-filter: implement %(if:equals=<string>) and %(if:notequals=<string>) ref-filter: include reference to 'used_atom' within 'atom_value' ...
Diffstat (limited to 'builtin/tag.c')
-rw-r--r--builtin/tag.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index e40c4a9..e6c1cf7 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -45,11 +45,11 @@ static int list_tags(struct ref_filter *filter, struct ref_sorting *sorting, con
if (!format) {
if (filter->lines) {
to_free = xstrfmt("%s %%(contents:lines=%d)",
- "%(align:15)%(refname:strip=2)%(end)",
+ "%(align:15)%(refname:lstrip=2)%(end)",
filter->lines);
format = to_free;
} else
- format = "%(refname:strip=2)";
+ format = "%(refname:lstrip=2)";
}
verify_ref_format(format);
@@ -389,6 +389,8 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
OPT_END()
};
+ setup_ref_filter_porcelain_msg();
+
git_config(git_tag_config, sorting_tail);
memset(&opt, 0, sizeof(opt));