Re: [PATCH v2 02/14] submodules: Add the lib-submodule-update.sh test library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jens Lehmann <Jens.Lehmann@xxxxxx> writes:

> +		rm -rf sub1 &&
> +		git checkout -f "$1" &&
> +		git status -u -s >actual &&
> +		test_must_be_empty actual &&
> +		sha1=$(git rev-parse HEAD:sub1 || true) &&

	$ xx=; xx=$(git rev-parse HEAD:no-such-path || true) ; echo $? ; echo "<$xx>"
        fatal: Path 'no-such-path' does not exist in 'HEAD'
        0
        <HEAD:no-such-path>

Perhaps you want --verify (or --revs-only) there, i.e.

	sha1=$(git rev-parse --verify HEAD:sub1 || :) &&

or

	sha1=$(git rev-parse --revs-only HEAD:sub1) &&

> +		if test -n "$sha1" &&
> ...
> +	sha1=$(git rev-parse "$commit:$submodule") &&

And here too.

> +	if test -z "$sha1"
--
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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]