Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-03 05:05:33 +0300
committerJunio C Hamano <junkio@cox.net>2006-11-03 05:05:33 +0300
commitc954d33da1c878788e7c01a50a5c1066622802c6 (patch)
tree1a4d0fb29d1b3b66d0b7249490555604297a389d /sha1_file.c
parentcd1464083cd9e61a55148c21fd9b8eb3bf76d190 (diff)
parentba158a32b9e237912ebe7dfe7bd56e2c531cb062 (diff)
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;
}