Re: [1.8.0 RFD] Homogeneous use of short options
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Feb 14, 2011, 19:03 UTC
- Message-ID
- <AANLkTi=PGwYz_GbYT3UR00UrhMi5KP_KU1y-+g+Qo1n9@mail.gmail.com>
- In-Reply-To
- <4D594460.1040206@drmicha.warpmail.net>
On Mon, Feb 14, 2011 at 10:04 AM, Michael J Gruber <git@drmicha.warpmail.net> wrote:
> tag -v: This is not a real problem, but users have certain expections > for "-f,-h,-n,-v" which we should break as rarely as possible. OTOH, > what would "verbose" mean for tag? (NB: tag.txt is grossly wrong.)
I made mine look like branch -v:
$ cat bin/git-tagv
#!/bin/sh
format='
case %(objecttype) in
commit)
sha1=%(objectname:short)
subject=%(subject)
;;
tag)
sha1=%(*objectname:short)
subject=%(*subject)
;;
esac
printf "%s\t%s\t%s\n" %(refname:short) "$sha1" "$subject"
'
eval "$(git for-each-ref --shell --format="$format" refs/tags)" |
column -t -s "$(printf '\t')"j.