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

Re: Can't figure out some sense from the git-commit-tree man page

From
DHDaniel Hulme <st@istic.org>
Date
Aug 17, 2007, 16:55 UTC
Message-ID
<20070817165519.GA28614@istic.org>
In-Reply-To
<20070817163034.GA11151@glandium.org>
On Fri, Aug 17, 2007 at 06:30:34PM +0200, Mike Hommey wrote:
Show 18 quoted lines
> Hi,
> 
> The git-commit-tree man page reads:
>   A commit encapsulates:
> 
>   ·   all parent object ids
> 
>   ·   author name, email and date
> 
>   ·   committer name and email and the commit time.
>   If not provided, "git-commit-tree" uses your name, hostname and domain to
>   provide author and committer info. This can be overridden by either
>   .git/config file, or using the following environment variables.
>   (...)
> 
> The "If not provided" part doesn't make sense. If you're not setting the
> author and committer in your config or environment, how are you supposed
> to provide it ?
Makes sense to me. I interpreted it as:
  If not provided (by one of the ways I'm about to mention), the default
  is ... This default can be overridden by ...

I can understand how it might be read differently, though. Assuming my reading is correct, might something along these lines be clearer:

  To find author and committer info, "git-commit-tree" first looks at
  these environment variables:
  ...
  If they are not set, it tries the keys user.name and user.email from
  the .git/config file. Finally, it falls back to using your name,
  hostname, and domain.

Even clearer, though this might be a bit extreme, would be to not mention .git/config and say it reads the global or repository-specific keys using git-config.

-- 
"I like talking to Rabbit.  He talks  about sensible things.  He doesn't
use long,  difficult words,  like Owl.  He uses short,  easy words, like
'What about  lunch?' and  'Help yourself,  Pooh.'  I suppose,  really, I
ought to go and see Rabbit."     A. A. Milne, 'The House at Pooh Corner'
Previous: Junio C Hamano
Message 11 of 11 in “Can't figure out some sense from the git-commit-tree man page”
  1. Mike HommeyAug 17, 2007
  2. Johannes SchindelinAug 17, 2007
  3. Mike HommeyAug 17, 2007
  4. Johannes SchindelinAug 17, 2007
  5. Jakub NarebskiAug 17, 2007
  6. J. Bruce FieldsAug 17, 2007
  7. Mike HommeyAug 17, 2007
  8. J. Bruce FieldsAug 17, 2007
  9. Clarify commit-tree documentationMike Hommey, Aug 17, 2007
  10. Junio C HamanoAug 17, 2007
  11. Daniel HulmeAug 17, 2007

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.