From: Junio C Hamano Date: Fri, 03 Feb 2012 23:30:25 GMT Subject: Re: [PATCH v4 13/13] tag: add --column Message-ID: <7vhaz7lcku.fsf@alter.siamese.dyndns.org> In-Reply-To: <1328276078-27955-14-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > @@ -421,6 +428,8 @@ int cmd_tag(int argc, const char **argv, const char *prefix) > }; > > git_config(git_tag_config, NULL); > + if (!colopts) > + colopts = git_colopts; > > memset(&opt, 0, sizeof(opt)); > > @@ -441,9 +450,19 @@ int cmd_tag(int argc, const char **argv, const char *prefix) > > if (list + delete + verify > 1) > usage_with_options(git_tag_usage, options); > - if (list) > - return list_tags(argv, lines == -1 ? 0 : lines, > - with_commit); > + if (list) { > + int ret; > + if (lines == -1) { > + struct column_options copts; > + memset(&copts, 0, sizeof(copts)); > + copts.padding = 2; > + run_column_filter(colopts, &copts); > + } > + ret = list_tags(argv, lines == -1 ? 0 : lines, with_commit); > + if (lines == -1) > + stop_column_filter(); > + return ret; > + } > if (lines != -1) > die(_("-n option is only allowed with -l.")); > if (with_commit) The patch is surprisingly small, which is a good sign. The same comment to the silent suppression "branch -v --column" applies here to "tag -n".