Re: [RFC/PATCH] verify-tag: add --check-name flag
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 7, 2016, 21:50 UTC
- Message-ID
- <xmqq37oopt28.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160607211707.GA7981@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> git tag -v --format='%(tag)%n%(tagger)' > > or similar. In fact you can already do that with a separate step (modulo > %n, which we do not seem to understand here), but like your example:
Yes, "--format=%(tag)" is all that is needed to make the example work.
Show 14 quoted lines
>> Or it could even do this: >> >> tag="$1" >> if ! git tag -v "$tag" >> if ! git tag -v "$tag" >> then >> echo >&2 "Bad tag." >> exit 1 >> fi >> + tag=$(git tag --show-tagname $tag) >> make dest=/usr/local/$package/$tag install > > It is racy. That probably doesn't matter for most callers, but it would > be nice to be able to get a custom format out of the "-v" invocation.
Heh, you can do
- tag="$1" + tag=$(git rev-parse --verify "$1")
upfront and it no longer is racy, no?