git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix backwards-incompatible handling of core.sharedRepository

From
Petr Baudis <pasky@suse.cz>
Date
Jul 10, 2008, 23:19 UTC
Message-ID
<20080710231853.21448.18643.stgit@rover.dkm.cz>

The 06cbe8550324e0fd2290839bf3b9a92aa53b70ab core.sharedRepository handling extension broke backwards compatibility; before, shared=1 meant that Git merely ensured the repository is group-writable, not that it's _only_ group-writable, which is the current behaviour.

Maybe it makes sense to provide the current semantics in some way too, but that cannot be done at the expense of ditching backwards compatibility; this bug has just wasted me two hours and broke repo.or.cz pushing for several hours.

Signed-off-by: Petr Baudis <pasky@rover.dkm.cz>
---
 Sorry for the resend, StGIT kind of tricked me to adding two Cc headers and
 the first one just got dropped.
 path.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/path.c b/path.c
index 5983255..75c5915 100644
--- a/path.c
+++ b/path.c
@@ -269,7 +269,7 @@ int adjust_shared_perm(const char *path)
 	mode = st.st_mode;
 
 	if (shared_repository) {
-		int tweak = shared_repository;
+		int tweak = (mode & 0777) | shared_repository;
 		if (!(mode & S_IWUSR))
 			tweak &= ~0222;
 		mode = (mode & ~0777) | tweak;
Next: Junio C Hamano
Message 1 of 5 in “Fix backwards-incompatible handling of core.sharedRepository”
  1. Fix backwards-incompatible handling of core.sharedRepositoryPetr Baudis, Jul 10, 2008
  2. Junio C HamanoJul 10, 2008
  3. Junio C HamanoJul 11, 2008
  4. Petr BaudisJul 11, 2008
  5. Junio C HamanoJul 12, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.