Skip to content

Commit 6dde18c

Browse files
authored
Merge pull request #1551 from knedlsepp/fix-scmdiff
Fix broken api/scmdiff endpoint
2 parents 5e2e967 + e0f65d4 commit 6dde18c

File tree

1 file changed

+2
-2
lines changed
  • src/lib/Hydra/Controller

1 file changed

+2
-2
lines changed

src/lib/Hydra/Controller/API.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,11 @@ sub scmdiff : Path('/api/scmdiff') Args(0) {
220220
my $clonePath = getSCMCacheDir . "/git/" . sha256_hex($uri);
221221
die if ! -d $clonePath;
222222
my ($stdout1, $stderr1);
223-
run3(['git', '-C', $clonePath, 'log', "$rev1..$rev2"], \undef, \$stdout1, \$stderr1);
223+
run3(['git', '--git-dir', '.git', '-C', $clonePath, 'log', "$rev1..$rev2"], \undef, \$stdout1, \$stderr1);
224224
$diff .= $stdout1 if $? == 0;
225225

226226
my ($stdout2, $stderr2);
227-
run3(['git', '-C', $clonePath, 'diff', "$rev1..$rev2"], \undef, \$stdout2, \$stderr2);
227+
run3(['git', '--git-dir', '.git', '-C', $clonePath, 'diff', "$rev1..$rev2"], \undef, \$stdout2, \$stderr2);
228228
$diff .= $stdout2 if $? == 0;
229229
}
230230

0 commit comments

Comments
 (0)