t7401: use 'short' instead of 'verify' and cut in rev-parse calls
authorShourya Shukla <redacted>
Fri, 21 Aug 2020 16:59:49 +0000 (22:29 +0530)
committerJunio C Hamano <redacted>
Fri, 21 Aug 2020 18:47:55 +0000 (11:47 -0700)
commit7303da30021761b3a7c862d795e67ab74b5d66eb
treeb5ac0241c07ef8a420c79047670bc587aab0c406
parent94e06c905740eaec7501fc026598b5839cc63fba
t7401: use 'short' instead of 'verify' and cut in rev-parse calls

'git rev-parse' can limit the number of characters in the hash it
outputs using the '--short' option, thereby, making the 'cut' invocation
redundant. Since using '--short' implies '--verify' as well, we can
safely replace the latter with the former. This change results in the
helper functions getting the hash in the same way 'summary' gets the
hash internally.

So, avoid the unnecessary invocation to 'cut' in the helper
functions.

Mentored-by: Christian Couder <redacted>
Mentored-by: Kaartic Sivaraam <redacted>
Signed-off-by: Shourya Shukla <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t7401-submodule-summary.sh
git clone https://git.99rst.org/PROJECT