git branches can share local clones

This commit is contained in:
Rob Vermaas 2011-11-30 11:40:35 -05:00
parent 2c328e4b20
commit 787ed37cb3
2 changed files with 2 additions and 2 deletions

View file

@ -221,7 +221,7 @@ sub scmdiff : Chained('api') PathPart('scmdiff') Args(0) {
$diff .= `(cd $clonePath ; hg log -r $rev1 -r $rev2 -b $branch)`;
$diff .= `(cd $clonePath ; hg diff -r $rev1:$rev2)`;
} elsif ($type eq "git") {
my $clonePath = scmPath . "/" . sha256_hex($uri.$branch);
my $clonePath = scmPath . "/" . sha256_hex($uri);
die if ! -d $clonePath;
$diff .= `(cd $clonePath ; git log $rev1..$rev2)`;
$diff .= `(cd $clonePath ; git diff $rev1..$rev2)`;

View file

@ -309,7 +309,7 @@ sub fetchInputGit {
my $clonePath;
mkpath(scmPath);
$clonePath = scmPath . "/" . sha256_hex($uri . $branch);
$clonePath = scmPath . "/" . sha256_hex($uri);
my $stdout; my $stderr;
if (! -d $clonePath) {