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

Re: [PATCH] tagger id

From
Junio C Hamano <junkio@twinsun.com>
Date
Jul 12, 2005, 21:16 UTC
Message-ID
<loom.20050712T230013-978@post.gmane.org>
In-Reply-To
<m14qb012x4.fsf@ebiederm.dsl.xmission.com>
Eric W. Biederman <ebiederm <at> xmission.com> writes:
Show 8 quoted lines
> 
> Junio C Hamano <junkio <at> cox.net> writes:
>
> > The only in-tree user after your patch is applied is the tagger
> > stuff, so in that sense committer_ident may make more sense.
> 
> There is also the commit path, and that comes from C.  I'm not
> quite certain how we should be using the environmental variables.
But there you would not have "default" issue, would you?
Show 5 quoted lines
> Part of the request was to put all of this information together
> in a common place.  And note that it is actually:
> tagger="$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE"
> Where the date is a human unreadable string of the number of seconds
> since the epoch (aka 1 Jan 1970 UTC).
This may sound whacy, but how about having git-env command that
 (1) parrots GIT_* environment variables if the user has one; or
 (2) shows the values of environment variables the user _could_ have had
     to cause the program to behave the same way, when it the user does
     not have them?
Synopsis.
  $ git-env [--values-only] [<variable name>...]
Examples.
 $ git-env GIT_COMMITER_DATE GIT_AUTHOR_NAME
 GIT_COMMITTER_DATE='1121202267 -0700'
 GIT_AUTHOR_NAME='Junio C Hamano'
 $ unset GIT_OBJECT_DIRECTORY
 $ GIT_DIR=foo git-env --values-only GIT_OBJECT_DIRECTORY
 foo/objects
 $ git-env
 GIT_DIR=.git
 GIT_OBJECT_DIRECTORY=.git/objects
 ...
 $ eval "`git-env GIT_COMMITTER_DATE GIT_COMMITTER_EMAIL GIT_COMMITTER_DATE`"
 $ tagger="$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE"

We could add a couple of "variable name"s that we do _not_ use from the environment as a shorthand as well while we are at it, so that you can say:

 $ git-env GIT_COMMITTER_ID
 GIT_COMMITTER_ID='Junio C Hamano <junkio@cox.net> 1121202267 -0700'

Once we go this route, it may even make sense to have that GIT_COMMITTER_ID environment variable as well. I don't know..

Previous: Petr BaudisNext: Eric W. Biederman
Message 18 of 25 in “Trial git RPM's..”
  1. Linus TorvaldsJul 11, 2005
  2. Eric W. BiedermanJul 11, 2005
  3. Linus TorvaldsJul 11, 2005
  4. Chris WrightJul 11, 2005
  5. Eric W. BiedermanJul 12, 2005
  6. Linus TorvaldsJul 12, 2005
  7. Eric W. BiedermanJul 12, 2005
  8. Linus TorvaldsJul 12, 2005
  9. Chris WrightJul 12, 2005
  10. Eric W. BiedermanJul 12, 2005
  11. Linus TorvaldsJul 12, 2005
  12. Eric W. BiedermanJul 12, 2005
  13. tagger idEric W. Biederman, Jul 12, 2005
  14. Eric W. BiedermanJul 12, 2005
  15. Junio C HamanoJul 12, 2005
  16. Eric W. BiedermanJul 12, 2005
  17. Petr BaudisJul 12, 2005
  18. Junio C HamanoJul 12, 2005
  19. Eric W. BiedermanJul 15, 2005
  20. Linus TorvaldsJul 12, 2005
  21. Eric W. BiedermanJul 12, 2005
  22. Junio C HamanoJul 12, 2005
  23. Eric W. BiedermanJul 15, 2005
  24. Eric W. BiedermanJul 12, 2005
  25. Chris WrightJul 11, 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.