Merge pull request #1215 from knedlsepp/fix-hydra-with-latest-git

scmdiff: Hardcode `--git-dir`
This commit is contained in:
Eelco Dolstra 2022-11-24 12:04:23 +01:00 committed by GitHub
commit 14d4624dc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,8 +216,8 @@ sub scmdiff : Path('/api/scmdiff') Args(0) {
} elsif ($type eq "git") {
my $clonePath = getSCMCacheDir . "/git/" . sha256_hex($uri);
die if ! -d $clonePath;
$diff .= `(cd $clonePath; git log $rev1..$rev2)`;
$diff .= `(cd $clonePath; git diff $rev1..$rev2)`;
$diff .= `(cd $clonePath; git --git-dir .git log $rev1..$rev2)`;
$diff .= `(cd $clonePath; git --git-dir .git diff $rev1..$rev2)`;
}
$c->stash->{'plain'} = { data => (scalar $diff) || " " };