All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@twinsun.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] tagger id
Date: Tue, 12 Jul 2005 21:16:52 +0000 (UTC)	[thread overview]
Message-ID: <loom.20050712T230013-978@post.gmane.org> (raw)
In-Reply-To: m14qb012x4.fsf@ebiederm.dsl.xmission.com

Eric W. Biederman <ebiederm <at> xmission.com> writes:

> 
> 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?

> 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..

  parent reply	other threads:[~2005-07-12 21:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-11  1:18 Trial git RPM's Linus Torvalds
2005-07-11 15:24 ` Eric W. Biederman
2005-07-11 17:06   ` Linus Torvalds
2005-07-11 20:11     ` Horst von Brand
2005-07-11 21:03     ` Chris Wright
2005-07-12 15:59       ` Eric W. Biederman
2005-07-12 17:01         ` Linus Torvalds
2005-07-12 17:14           ` Eric W. Biederman
2005-07-12 17:27             ` Linus Torvalds
2005-07-12 17:46               ` Chris Wright
2005-07-12  0:55     ` Eric W. Biederman
2005-07-12  1:15       ` Linus Torvalds
2005-07-12  2:39         ` Eric W. Biederman
2005-07-12  4:39         ` [PATCH] tagger id Eric W. Biederman
2005-07-12  6:50           ` Eric W. Biederman
2005-07-12  8:44             ` Junio C Hamano
2005-07-12 15:04               ` Eric W. Biederman
2005-07-12 15:14                 ` Petr Baudis
2005-07-12 21:16                 ` Junio C Hamano [this message]
2005-07-15  0:46                   ` Eric W. Biederman
2005-07-12 18:54             ` Linus Torvalds
2005-07-12 22:15               ` Eric W. Biederman
2005-07-12 23:42                 ` Junio C Hamano
2005-07-15  0:36                   ` Eric W. Biederman
2005-07-12  0:58     ` Trial git RPM's Eric W. Biederman
2005-07-11 20:34   ` Chris Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20050712T230013-978@post.gmane.org \
    --to=junkio@twinsun.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.