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 <gitster@pobox.com>2012-07-23 00:04:05 +0400
committerJunio C Hamano <gitster@pobox.com>2012-07-23 00:04:05 +0400
commit7046e7582121a8b7b9d126b492cb439631843444 (patch)
tree0411e587b0632f704c25a69602ab82ac54574a5f
parentc9603dfae5856aba6a8ed64719a2e73da066ad84 (diff)
parent6ff2b729debc07fce5c5c1226f9fee9ea59cd7ab (diff)
Merge branch 'ar/clone-honor-umask-at-top' into maint
A handful of files and directories we create had tighter than necessary permission bits when the user wanted to have group writability (e.g. by setting "umask 002"). * ar/clone-honor-umask-at-top: add: create ADD_EDIT.patch with mode 0666 rerere: make rr-cache fanout directory honor umask Restore umasks influence on the permissions of work tree created by clone
-rw-r--r--builtin/add.c2
-rw-r--r--builtin/clone.c2
-rw-r--r--rerere.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 87446cf92a..89dce56a24 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -281,7 +281,7 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
argc = setup_revisions(argc, argv, &rev, NULL);
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
DIFF_OPT_SET(&rev.diffopt, IGNORE_DIRTY_SUBMODULES);
- out = open(file, O_CREAT | O_WRONLY, 0644);
+ out = open(file, O_CREAT | O_WRONLY, 0666);
if (out < 0)
die (_("Could not open '%s' for writing."), file);
rev.diffopt.file = xfdopen(out, "w");
diff --git a/builtin/clone.c b/builtin/clone.c
index f86aaf18f7..920ef7f8c9 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -708,7 +708,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
if (safe_create_leading_directories_const(work_tree) < 0)
die_errno(_("could not create leading directories of '%s'"),
work_tree);
- if (!dest_exists && mkdir(work_tree, 0755))
+ if (!dest_exists && mkdir(work_tree, 0777))
die_errno(_("could not create work tree dir '%s'."),
work_tree);
set_git_work_tree(work_tree);
diff --git a/rerere.c b/rerere.c
index dcb525a4d0..651c5def92 100644
--- a/rerere.c
+++ b/rerere.c
@@ -524,7 +524,7 @@ static int do_plain_rerere(struct string_list *rr, int fd)
continue;
hex = xstrdup(sha1_to_hex(sha1));
string_list_insert(rr, path)->util = hex;
- if (mkdir(git_path("rr-cache/%s", hex), 0755))
+ if (mkdir_in_gitdir(git_path("rr-cache/%s", hex)))
continue;
handle_file(path, NULL, rerere_path(hex, "preimage"));
fprintf(stderr, "Recorded preimage for '%s'\n", path);