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

Re: [PATCH] Write .editmsg in GIT_DIR to avoid being in git-status.

From
Junio C Hamano <junkio@cox.net>
Date
Oct 6, 2005, 20:19 UTC
Message-ID
<7vpsqi8kke.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<8aa486160510060630m2afb18ffx@mail.gmail.com>
Santi Bejar <sbejar@gmail.com> writes:
>> If a working tree is read-only, I wonder what you are committing.
>
> I keep my /etc modifications in git, and I want to commit as a
> user not as root.

OK. Your /etc/.git is writable by you but /etc is not. Although I personally would do it a bit differently (my /etc sources would live in a different area which is a source tree and 'make install' as root would install the latest to /etc; no need for anything user writable under /etc, including /etc/.git/), I do not think your set-up is wrong -- we should support it.

>> ... If the working tree root level is not writable for you,
>> is it valid/reasonable to assume that $GIT_DIR is?

I changed my mind about this. $GIT_DIR by definition should be writable by you since we are talking about committing -- I think moving them to $GIT_DIR/ is a good change.

Previous: Santi Bejar
Message 4 of 4 in “Write .editmsg in GIT_DIR to avoid being in git-status.”
  1. Write .editmsg in GIT_DIR to avoid being in git-status.Santi Béjar, Oct 5, 2005
  2. Junio C HamanoOct 5, 2005
  3. Santi BejarOct 6, 2005
  4. Junio C HamanoOct 6, 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.