Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Git.pm: add specified name to tempfile template
author
Eric Wong
<normalperson@yhbt.net>
Wed, 29 Oct 2014 19:31:55 +0000
(19:31 +0000)
committer
Eric Wong
<normalperson@yhbt.net>
Wed, 29 Oct 2014 19:59:23 +0000
(19:59 +0000)
This should help me track down errors in git-svn more easily:
write .git/Git_XXXXXX: Bad file descriptor
at /usr/lib/perl5/SVN/Ra.pm line 623
Signed-off-by: Eric Wong <normalperson@yhbt.net>
perl/Git.pm
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
7676aff
)
diff --git
a/perl/Git.pm
b/perl/Git.pm
index 204fdc673754c82637c59992198a2c8d31e05fa8..b5905ee1ad03fe9973e3cf7d46fa29c5cf184215 100644
(file)
--- a/
perl/Git.pm
+++ b/
perl/Git.pm
@@
-1294,8
+1294,11
@@
sub _temp_cache {
$tmpdir = $self->repo_path();
}
+ my $n = $name;
+ $n =~ s/\W/_/g; # no strange chars
+
($$temp_fd, $fname) = File::Temp::tempfile(
-
'Git_XXXXXX'
, UNLINK => 1, DIR => $tmpdir,
+
"Git_${n}_XXXXXX"
, UNLINK => 1, DIR => $tmpdir,
) or throw Error::Simple("couldn't open new temp file");
$$temp_fd->autoflush;