Re: [PATCH] Add git-unbundle - unpack objects and references for disconnected transfer

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

 



Mark Levedahl <mdl123@xxxxxxxxxxx> writes:

> +# check that the prerequisites exist before unbundling.
> +for sha1 in $prereqs ; do
> +	git-rev-parse --verify $sha1 >& /dev/null || die "Prerequisite commit $sha1 not found."
> +done

If you are checking only boundary commits this is too weak a
check and unsafe (we used to have the same bug in http fetch
long time ago).  You have to make sure not only the object
exists, but also it is reachable by one of the refs.

One way to check that would be to ask "describe --all" if it can
find a ref that can reach that commit.  It would error out if
the commit object exists but is not reachable from any of the
refs.





-
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]