summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-06 22:56:07 -0800
committerJunio C Hamano <junkio@cox.net>2006-11-06 22:56:07 -0800
commitbd45fec8397f1f0804db1d18af7193be323b0326 (patch)
treed167c73fa8da80ad93840de8fdb6e13d6b39f371 /path.c
parentd28f7cb93537554e069667602a7624952e06df50 (diff)
parente52775f43857f377aa2aa69f82ac2d2f26dc6297 (diff)
downloadgit-bd45fec8397f1f0804db1d18af7193be323b0326.tar.gz
Merge branch 'maint'
* maint: Documentation: Transplanting branch with git-rebase --onto merge-recursive implicitely depends on trust_executable_bit adjust_shared_perm: chmod() only when needed. Fix git-runstatus for repositories containing a file named HEAD
Diffstat (limited to 'path.c')
-rw-r--r--path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/path.c b/path.c
index bb89fb02dc..d2c076d7cb 100644
--- a/path.c
+++ b/path.c
@@ -279,7 +279,7 @@ int adjust_shared_perm(const char *path)
: 0));
if (S_ISDIR(mode))
mode |= S_ISGID;
- if (chmod(path, mode) < 0)
+ if ((mode & st.st_mode) != mode && chmod(path, mode) < 0)
return -2;
return 0;
}