Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH] update-server-info: honor core.sharedRepository

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:20
Subsystem: the rest · Maintainer: Linus Torvalds

Earlier, update-server-info used the umask, even if
core.sharedRepository = 1.

Noticed by madduck on IRC.

Signed-off-by: Johannes Schindelin <redacted>

---

	Does this work for you?

 server-info.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/server-info.c b/server-info.c
index f9be5a7..0d1312c 100644
--- a/server-info.c
+++ b/server-info.c
@@ -38,6 +38,7 @@ static int update_info_refs(int force)
 		return error("unable to update %s", path0);
 	for_each_ref(add_info_ref, NULL);
 	fclose(info_ref_fp);
+	adjust_shared_perm(path1);
 	rename(path1, path0);
 	free(path0);
 	free(path1);
@@ -227,6 +228,7 @@ static int update_info_packs(int force)
 		return error("cannot open %s", name);
 	write_pack_info_file(fp);
 	fclose(fp);
+	adjust_shared_perm(name);
 	rename(name, infofile);
 	return 0;
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help