summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorKyle J. McKay <mackyle@gmail.com>2013-07-19 00:16:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-19 03:31:43 (GMT)
commit9c0810732c50106d1a93866ca3fa1285e07778f1 (patch)
treeaeb18b7fcf511afbdc00817658418103a2e745d0 /perl
parent8ac251b66b952b0eddfa4e5bbf08a3c0ae7dbc0b (diff)
downloadgit-9c0810732c50106d1a93866ca3fa1285e07778f1.zip
git-9c0810732c50106d1a93866ca3fa1285e07778f1.tar.gz
git-9c0810732c50106d1a93866ca3fa1285e07778f1.tar.bz2
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 <mackyle@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'perl')
-rw-r--r--perl/Git.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl/Git.pm b/perl/Git.pm
index 0ba15b9..204fdc6 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1277,7 +1277,7 @@ sub _temp_cache {
my $temp_fd = \$TEMP_FILEMAP{$name};
if (defined $$temp_fd and $$temp_fd->opened) {
- if (temp_is_locked($name)) {
+ if ($TEMP_FILES{$$temp_fd}{locked}) {
throw Error::Simple("Temp file with moniker '" .
$name . "' already in use");
}