summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-11-02 18:05:33 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2006-11-02 18:05:33 -0800
commitc954d33da1c878788e7c01a50a5c1066622802c6 (patch)
tree1a4d0fb29d1b3b66d0b7249490555604297a389d /sha1_file.c
parentgitweb: Use git-for-each-ref to generate list of heads and/or tags (diff)
parentgit-clone documentation didn't mention --origin as equivalent of -o (diff)
downloadtgif-c954d33da1c878788e7c01a50a5c1066622802c6.tar.xz
Merge branch 'maint'
* maint: git-clone documentation didn't mention --origin as equivalent of -o Minor grammar fixes for git-diff-index.txt link_temp_to_file: call adjust_shared_perm() only when we created the directory
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 570706919a..4e5ee1054f 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1399,8 +1399,7 @@ static int link_temp_to_file(const char *tmpfile, const char *filename)
dir = strrchr(filename, '/');
if (dir) {
*dir = 0;
- mkdir(filename, 0777);
- if (adjust_shared_perm(filename)) {
+ if (!mkdir(filename, 0777) && adjust_shared_perm(filename)) {
*dir = '/';
return -2;
}