Skip to content

Commit 9c08107

Browse files
mackylegitster
authored andcommitted
Git.pm: revert _temp_cache use of temp_is_locked
When the temp_is_locked function was introduced, there was a desire to make _temp_cache use it. Unfortunately due to the various tests and logic flow involved changing the _temp_cache function to use the new temp_is_locked function is problematic as _temp_cache needs a slightly different test than is provided by the temp_is_locked function. This change reverts use of temp_is_locked in the _temp_cache function and restores the original code that existed there before the temp_is_locked function was added. Signed-off-by: Kyle J. McKay <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8ac251b commit 9c08107

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

perl/Git.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@ sub _temp_cache {
12771277

12781278
my $temp_fd = \$TEMP_FILEMAP{$name};
12791279
if (defined $$temp_fd and $$temp_fd->opened) {
1280-
if (temp_is_locked($name)) {
1280+
if ($TEMP_FILES{$$temp_fd}{locked}) {
12811281
throw Error::Simple("Temp file with moniker '" .
12821282
$name . "' already in use");
12831283
}

0 commit comments

Comments
 (0)