summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-06-10 01:31:58 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-06-10 01:31:58 -0700
commit67d4160712ef07bc7a5bc6790f166ba39d45a82a (patch)
treee4204935d23f0df97b493086ed6fb9eb29ad378e /sha1_file.c
parentMerge branch 'pe/date' into next (diff)
parentshared repository: optionally allow reading to "others". (diff)
downloadtgif-67d4160712ef07bc7a5bc6790f166ba39d45a82a.tar.xz
Merge branch 'jc/shared' into next
* jc/shared: shared repository: optionally allow reading to "others". git-clone: fix --bare over dumb-http shared repository - add a few missing calls to adjust_shared_perm(). Fix formatting of Documentation/git-clone.txt builtin-init-db: spell the in-program configuration variable in lowercase.
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/sha1_file.c b/sha1_file.c
index aea0f40d57..b4ff233bad 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -50,29 +50,6 @@ int get_sha1_hex(const char *hex, unsigned char *sha1)
return 0;
}
-int adjust_shared_perm(const char *path)
-{
- struct stat st;
- int mode;
-
- if (!shared_repository)
- return 0;
- if (lstat(path, &st) < 0)
- return -1;
- mode = st.st_mode;
- if (mode & S_IRUSR)
- mode |= S_IRGRP;
- if (mode & S_IWUSR)
- mode |= S_IWGRP;
- if (mode & S_IXUSR)
- mode |= S_IXGRP;
- if (S_ISDIR(mode))
- mode |= S_ISGID;
- if (chmod(path, mode) < 0)
- return -2;
- return 0;
-}
-
int safe_create_leading_directories(char *path)
{
char *pos = path;