summaryrefslogtreecommitdiff
path: root/t/t5501-fetch-push-alternates.sh
AgeCommit message (Collapse)Author
2011-11-21t5501-*.sh: Fix url passed to clone in setup testRamsay Jones
In particular, the url passed to git-clone has an extra '/' given after the 'file://' schema prefix, thus: git clone --reference=original "file:///$(pwd)/original one Once the prefix is removed, the remainder of the url looks something like "//home/ramsay/git/t/...", which is then interpreted as an network path. This then results in a "Permission denied" error, like so: ramsay $ ls //home ls: cannot access //home: No such host or network path ramsay $ ls //home/ramsay ls: cannot access //home/ramsay: Permission denied ramsay $ In order to fix the problem, we simply remove the extraneous '/' character from the url. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-17fetch-pack: objects in our alternates are available to usJunio C Hamano
Use the helper function split from the receiving end of "git push" to allow the same optimization on the receiving end of "git fetch". Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Shawn O. Pearce <spearce@spearce.org>
2011-03-17refs_from_alternate: helper to use refs from alternatesJunio C Hamano
The receiving end of "git push" advertises the objects that the repository itself does not use, but are at the tips of refs in other repositories whose object databases are used as alternates for it. This helps it avoid having to receive (and the pusher having to send) objects that are already available to the receiving repository via the alternates mechanism. Tweak the helper function that implements this feature, and move it to transport.[ch] for future reuse by other programs. The additional test demonstrates how this optimization is helping "git push", and "git fetch" is ignorant about it. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Shawn O. Pearce <spearce@spearce.org>