summaryrefslogtreecommitdiff
path: root/pack.h
diff options
context:
space:
mode:
authorMichael McClimon <michael@mcclimon.org>2022-10-16 21:22:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-10-18 05:13:04 (GMT)
commit77a1310e6b3f39f405275faa8c5af02cf5453cb6 (patch)
tree4e903f1661169f5c12346a43ae4773c0f706b231 /pack.h
parent3dcec76d9df911ed8321007b1d197c1a206dc164 (diff)
downloadgit-77a1310e6b3f39f405275faa8c5af02cf5453cb6.zip
git-77a1310e6b3f39f405275faa8c5af02cf5453cb6.tar.gz
git-77a1310e6b3f39f405275faa8c5af02cf5453cb6.tar.bz2
Git.pm: add semicolon after catch statement
When attempting to initialize a repository object in an unsafe directory, a syntax error is reported (Can't use string as a HASH ref while strict refs in use). Fix this runtime error by adding the required semicolon after the catch statement. Without the semicolon, the result of the following line (i.e., the result of Cwd::abs_path) is passed as the third argument to Error.pm's catch function. That function expects that its third argument, $clauses, is a hash reference, and trying to access a string as a hash reference is a fatal error. [1] https://lore.kernel.org/git/20221011182607.f1113fff-9333-427d-ba45-741a78fa6040@korelogic.com/ Reported-by: Hank Leininger <hlein@korelogic.com> Signed-off-by: Michael McClimon <michael@mcclimon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack.h')
0 files changed, 0 insertions, 0 deletions