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

Re: [RFC][PATCH] Rewriting revs in place in push target repository

From
Petr Baudis <pasky@suse.cz>
Date
Sep 15, 2005, 17:16 UTC
Message-ID
<20050915171641.GA23259@pasky.or.cz>
In-Reply-To
<7vwtmpjq17.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Sun, Aug 14, 2005 at 02:55:16AM CEST, I got a letter where Junio C Hamano <junkio@cox.net> told me that...

Show 16 quoted lines
> Petr Baudis <pasky@suse.cz> writes:
> 
> > Rewrite refs in place in receive-pack & friends
> >
> > When updating a ref, it would write a new file with the new ref and
> > then rename it, overwriting the original file. The problem is that
> > this destroys permissions and ownership of the original file, which is
> > troublesome especially in multiuser environment, like the one I live in.
> 
> Hmph.  If a repo is _really_ used multiuser then you should not
> have to care about ownership.  If you can write into a
> repository for a project (implying that you are a member of that
> project group), and if your umask is set up correctly (meaning
> it is 002 or looser), and with g+s bit on the directory at the
> repository root level when it was created, shouldn't your newly
> created ref file be also writable by others in that project?

Hmm, but how do you actually set the umask correctly just for git pushing? I'm sorry but it doesn't occur to me.

I like Linus' solution, but have no time to do the patch now, so I did just a quick dirty fix and added a chmod to hooks/update. ;-)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone.  -- Alan Cox
Previous: Linus TorvaldsNext: Chris Wedgwood
Message 5 of 7 in “Rewriting revs in place in push target repository”
  1. Petr BaudisAug 13, 2005
  2. Linus TorvaldsAug 13, 2005
  3. Junio C HamanoAug 14, 2005
  4. Linus TorvaldsAug 14, 2005
  5. Petr BaudisSep 15, 2005
  6. Chris WedgwoodAug 14, 2005
  7. Matthias UrlichsAug 14, 2005

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.