summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martin.von.zweigbergk@gmail.com>2011-04-05 02:14:16 (GMT)
committerPaul Mackerras <paulus@samba.org>2011-07-24 05:34:54 (GMT)
commit929f577e0a648dd1c90b92d8a3f6f1899f2fa0e2 (patch)
tree2c65d24a2fa573b6883ab84c4ea79bfa25bde875 /gitk
parent784b7e2f25ce2a812d6b2dcbe4d3a2ea93484bb4 (diff)
downloadgit-929f577e0a648dd1c90b92d8a3f6f1899f2fa0e2.zip
git-929f577e0a648dd1c90b92d8a3f6f1899f2fa0e2.tar.gz
git-929f577e0a648dd1c90b92d8a3f6f1899f2fa0e2.tar.bz2
gitk: Put temporary directory inside .git
When running "External diff" from gitk, the "from" and "to" files will first be copied into a directory that is currently ".git/../.gitk-tmp.$pid". When gitk is closed, the directory is deleted. When the work tree is not at ".git/.." (which is supported since the previous commit), that directory may not even be git-related and it does not seem unlikely that permissions may not allow the temporary directory to be created there. Move the directory inside .git instead. This introduces a regression in the case that the .git directory is readonly, but .git/.. is writeable. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk3
1 files changed, 1 insertions, 2 deletions
diff --git a/gitk b/gitk
index 5d15005..e263b49 100755
--- a/gitk
+++ b/gitk
@@ -3331,8 +3331,7 @@ proc gitknewtmpdir {} {
global diffnum gitktmpdir gitdir
if {![info exists gitktmpdir]} {
- set gitktmpdir [file join [file dirname $gitdir] \
- [format ".gitk-tmp.%s" [pid]]]
+ set gitktmpdir [file join $gitdir [format ".gitk-tmp.%s" [pid]]]
if {[catch {file mkdir $gitktmpdir} err]} {
error_popup "[mc "Error creating temporary directory %s:" $gitktmpdir] $err"
unset gitktmpdir