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

Re: [PATCH] Add committer and author names to top of COMMIT_EDITMSG.

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 12, 2008, 04:57 UTC
Message-ID
<7vve5zy72p.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<9b3e2dc20801111825i644da598i7556ef700b870445@mail.gmail.com>
"Stephen Sinclair" <radarsat1@gmail.com> writes:
Show 14 quoted lines
>> In a properly configured repository, telling you who git thinks
>> you are is _ALWAYS_ useless (that's the definition of "properly
>> configured").  Just admit it.
>
> Well, I'll admit that I don't really understand you here.
> Maybe I'm still too much of a git newbie on this.  (Fair enough.)
> Right now the only way to make sure I'm committing as myself with my
> proper email address is to:
>
> --  remember to "git-config --list", and check that my email is listed.
> --  "git-commit; git-log", and remember to check the last entry before
> doing a "git-push".
>
> Am I missing something?
They are both valid means to make sure you did not misconfigure.

You omitted the part that matters from the part you quoted above, but this discussion was about "showing AUTHOR if it is different from me", which was _one of_ the two conditions I suggested in my counterproposal, and I was saying that it is useless to expect that you would be able to find a misconfiguration when AUTHOR is shown for this first reason. This part is _not_ about catching your misconfiguration.

The other part is about the misconfiguration catching.
> Especially considering the default name is taken from the hostname
> anyway -- you're taking the local hostname and then checking with a
> rule to see if it might be localhost.

Yes, and earlier you said one of the undesirable ones was "yourname@foo.local" (and others were "yourname@foo.(none)"). IOW, "localhost" is one of the things you want to catch as unconfigured bogosity that you want to catch, isn't it?

And that is _the other_ condition in my counterproposal to show AUTHOR.

To rephrase, you would show AUTHOR when one of the conditions holds true, either:

 (1) "not me" (so that we can remind that other's commit is
     being amended); _OR_ 
 (2) "funny me" (so that we can catch misconfiguration.

The latter would not have to trigger once you configure your ~/.gitconfig (or .git/config) properly.

Previous: Stephen SinclairNext: Stephen Sinclair
Message 9 of 17 in “Add committer and author names to top of COMMIT_EDITMSG.”
  1. Add committer and author names to top of COMMIT_EDITMSG.Stephen Sinclair, Jan 11, 2008
  2. Johannes SchindelinJan 11, 2008
  3. Junio C HamanoJan 11, 2008
  4. Stephen SinclairJan 12, 2008
  5. Junio C HamanoJan 12, 2008
  6. Stephen SinclairJan 12, 2008
  7. Junio C HamanoJan 12, 2008
  8. Stephen SinclairJan 12, 2008
  9. Junio C HamanoJan 12, 2008
  10. Stephen SinclairJan 12, 2008
  11. Junio C HamanoJan 12, 2008
  12. Jeff KingJan 12, 2008
  13. Junio C HamanoJan 12, 2008
  14. Junio C HamanoJan 12, 2008
  15. Jeff KingJan 12, 2008
  16. Junio C HamanoJan 12, 2008
  17. Jeff KingJan 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.