Re: [PATCH v4 13/13] tag: add --column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> 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".
--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]