Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes: > 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". -- 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