Re: [PATCH v2 4/4] buitin-status: Add tests for submodule summary
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 13, 2008, 18:04 UTC
- Message-ID
- <7vprtyxzzd.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <47D93875.1050407@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 11 quoted lines
> Ping Yin schrieb: >> +cd sm && >> +head=$(git rev-parse --verify HEAD | cut -c1-7) && >> +cd .. > > I think you can make these three lines into: > > test_expect_success 'get short SHA1 of submodule HEAD' ' > > head=$(cd sm && git rev-parse --verify HEAD | cut -c1-7) > '
"git rev-parse --short=12 --verify HEAD" or whatever minimum length you would want would free you from an ugly "pipe to cut".