git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Can't figure out some sense from the git-commit-tree man page
@ 2007-08-17 16:30 Mike Hommey
  2007-08-17 16:52 ` Johannes Schindelin
  2007-08-17 16:55 ` Can't figure out some sense from the git-commit-tree man page Daniel Hulme
  0 siblings, 2 replies; 11+ messages in thread
From: Mike Hommey @ 2007-08-17 16:30 UTC (permalink / raw)
  To: git

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 ?

Naively, I tried sending a "git-cat-file commit" looking text to stdin,
but it just ended up in the changelog, which was actually no surprise.

Mike

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Can't figure out some sense from the git-commit-tree man page
  2007-08-17 16:30 Can't figure out some sense from the git-commit-tree man page Mike Hommey
@ 2007-08-17 16:52 ` Johannes Schindelin
  2007-08-17 16:56   ` Mike Hommey
  2007-08-17 17:04   ` J. Bruce Fields
  2007-08-17 16:55 ` Can't figure out some sense from the git-commit-tree man page Daniel Hulme
  1 sibling, 2 replies; 11+ messages in thread
From: Johannes Schindelin @ 2007-08-17 16:52 UTC (permalink / raw)
  To: Mike Hommey; +Cc: git

Hi,

On Fri, 17 Aug 2007, Mike Hommey wrote:

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

It does, if you know how to specify the committer info.  Which the man 
page specifies how to provide:

This can be overridden by either `.git/config` file, or using the 
following environment variables.

        GIT_AUTHOR_NAME
        GIT_AUTHOR_EMAIL
        GIT_AUTHOR_DATE
        GIT_COMMITTER_NAME
        GIT_COMMITTER_EMAIL
        GIT_COMMITTER_DATE
        EMAIL

Hth,
Dscho

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Can't figure out some sense from the git-commit-tree man page
  2007-08-17 16:30 Can't figure out some sense from the git-commit-tree man page Mike Hommey
  2007-08-17 16:52 ` Johannes Schindelin
@ 2007-08-17 16:55 ` Daniel Hulme
  1 sibling, 0 replies; 11+ messages in thread
From: Daniel Hulme @ 2007-08-17 16:55 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1737 bytes --]

On Fri, Aug 17, 2007 at 06:30:34PM +0200, Mike Hommey wrote:
> 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'

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Can't figure out some sense from the git-commit-tree man page
  2007-08-17 16:52 ` Johannes Schindelin
@ 2007-08-17 16:56   ` Mike Hommey
  2007-08-17 17:09     ` Johannes Schindelin
  2007-08-17 17:16     ` Jakub Narebski
  2007-08-17 17:04   ` J. Bruce Fields
  1 sibling, 2 replies; 11+ messages in thread
From: Mike Hommey @ 2007-08-17 16:56 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

On Fri, Aug 17, 2007 at 05:52:52PM +0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
> 
> On Fri, 17 Aug 2007, Mike Hommey wrote:
> 
> >   ?   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.
> 
> It does, if you know how to specify the committer info.  Which the man 
> page specifies how to provide:
> 
> This can be overridden by either `.git/config` file, or using the 
> following environment variables.
> 
>         GIT_AUTHOR_NAME
>         GIT_AUTHOR_EMAIL
>         GIT_AUTHOR_DATE
>         GIT_COMMITTER_NAME
>         GIT_COMMITTER_EMAIL
>         GIT_COMMITTER_DATE
>         EMAIL

This is exactly where the man page doesn't make sense to me. It tells
you that if you don't provide committer name, etc. it uses your name,
hostname, etc., and you can override this with .git/config or the
environment variable you listed.

So where were you supposed to provide these informations in the first
place ?

Mike

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Can't figure out some sense from the git-commit-tree man page
  2007-08-17 16:52 ` Johannes Schindelin
  2007-08-17 16:56   ` Mike Hommey
@ 2007-08-17 17:04   ` J. Bruce Fields
  2007-08-17 17:23     ` Mike Hommey
  1 sibling, 1 reply; 11+ messages in thread
From: J. Bruce Fields @ 2007-08-17 17:04 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Mike Hommey, git

On Fri, Aug 17, 2007 at 05:52:52PM +0100, Johannes Schindelin wrote:
> Hi,
> 
> On Fri, 17 Aug 2007, Mike Hommey wrote:
> 
> >   ?   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.
> 
> It does, if you know how to specify the committer info.
>
> Which the man page specifies how to provide:

At least on a first reading all of the following appears to fall under
the "if not provided" case.  I know what you mean, but the language here
is misleading.  One simple fix would be just to delete the words "If not
provided", or maybe replace them by "By default, ...".

--b.

> 
> This can be overridden by either `.git/config` file, or using the 
> following environment variables.
> 
>         GIT_AUTHOR_NAME
>         GIT_AUTHOR_EMAIL
>         GIT_AUTHOR_DATE
>         GIT_COMMITTER_NAME
>         GIT_COMMITTER_EMAIL
>         GIT_COMMITTER_DATE
>         EMAIL

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Can't figure out some sense from the git-commit-tree man page
  2007-08-17 16:56   ` Mike Hommey
@ 2007-08-17 17:09     ` Johannes Schindelin
  2007-08-17 17:16     ` Jakub Narebski
  1 sibling, 0 replies; 11+ messages in thread
From: Johannes Schindelin @ 2007-08-17 17:09 UTC (permalink / raw)
  To: Mike Hommey; +Cc: git

Hi,

On Fri, 17 Aug 2007, Mike Hommey wrote:

> On Fri, Aug 17, 2007 at 05:52:52PM +0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > 
> > On Fri, 17 Aug 2007, Mike Hommey wrote:
> > 
> > >   ?   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.
> > 
> > It does, if you know how to specify the committer info.  Which the man 
> > page specifies how to provide:
> > 
> > This can be overridden by either `.git/config` file, or using the 
> > following environment variables.
> > 
> >         GIT_AUTHOR_NAME
> >         GIT_AUTHOR_EMAIL
> >         GIT_AUTHOR_DATE
> >         GIT_COMMITTER_NAME
> >         GIT_COMMITTER_EMAIL
> >         GIT_COMMITTER_DATE
> >         EMAIL
> 
> This is exactly where the man page doesn't make sense to me. It tells
> you that if you don't provide committer name, etc. it uses your name,
> hostname, etc., and you can override this with .git/config or the
> environment variable you listed.
> 
> So where were you supposed to provide these informations in the first
> place ?

In /etc/passwd.  Like on every Unix system.  (Oh yeah, there is NIS and 
other things, but in effect it is the same system.)

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Can't figure out some sense from the git-commit-tree man page
  2007-08-17 16:56   ` Mike Hommey
  2007-08-17 17:09     ` Johannes Schindelin
@ 2007-08-17 17:16     ` Jakub Narebski
  1 sibling, 0 replies; 11+ messages in thread
From: Jakub Narebski @ 2007-08-17 17:16 UTC (permalink / raw)
  To: git

[Cc: Mike Hommey <mh@glandium.org>, git@vger.kernel.org]

Mike Hommey wrote:

> On Fri, Aug 17, 2007 at 05:52:52PM +0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>> 
>> On Fri, 17 Aug 2007, Mike Hommey wrote:
>> 
>>>   ?   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.
>> 
>> It does, if you know how to specify the committer info.  Which the man 
>> page specifies how to provide:
>> 
>> This can be overridden by either `.git/config` file, or using the 
>> following environment variables.
>> 
>>         GIT_AUTHOR_NAME
>>         GIT_AUTHOR_EMAIL
>>         GIT_AUTHOR_DATE
>>         GIT_COMMITTER_NAME
>>         GIT_COMMITTER_EMAIL
>>         GIT_COMMITTER_DATE
>>         EMAIL
> 
> This is exactly where the man page doesn't make sense to me. It tells
> you that if you don't provide committer name, etc. it uses your name,
> hostname, etc., and you can override this with .git/config or the
> environment variable you listed.
> 
> So where were you supposed to provide these informations in the first
> place ?

Where you are supposed to provide this information? In .git/config (per
repository) or in ~/.gitconfig (per user), in the form:

[user]
        name  = Mike Hommey
        email = mh@glandium.org


"If not provided" means that git gets your user name from system, from the
GECOS files in /etc/passwd, and composes your email address from your user
id (account name), and from the hostname of your machine (or "(localhost)").
This is last resort fallback, so you better provide user and email yourself.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Can't figure out some sense from the git-commit-tree man page
  2007-08-17 17:04   ` J. Bruce Fields
@ 2007-08-17 17:23     ` Mike Hommey
  2007-08-17 17:36       ` J. Bruce Fields
  0 siblings, 1 reply; 11+ messages in thread
From: Mike Hommey @ 2007-08-17 17:23 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Johannes Schindelin, git

On Fri, Aug 17, 2007 at 01:04:11PM -0400, J. Bruce Fields <bfields@fieldses.org> wrote:
> On Fri, Aug 17, 2007 at 05:52:52PM +0100, Johannes Schindelin wrote:
> > Hi,
> > 
> > On Fri, 17 Aug 2007, Mike Hommey wrote:
> > 
> > >   ?   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.
> > 
> > It does, if you know how to specify the committer info.
> >
> > Which the man page specifies how to provide:
> 
> At least on a first reading all of the following appears to fall under
> the "if not provided" case.  I know what you mean, but the language here
> is misleading.  One simple fix would be just to delete the words "If not
> provided", or maybe replace them by "By default, ...".

I think it would be better to put the fact that "If not provided..."
*after* telling that you can provide author, committer, etc. by setting
environment or editing the conf.

Mike

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Can't figure out some sense from the git-commit-tree man page
  2007-08-17 17:23     ` Mike Hommey
@ 2007-08-17 17:36       ` J. Bruce Fields
  2007-08-17 20:13         ` [PATCH] Clarify commit-tree documentation Mike Hommey
  0 siblings, 1 reply; 11+ messages in thread
From: J. Bruce Fields @ 2007-08-17 17:36 UTC (permalink / raw)
  To: Mike Hommey; +Cc: Johannes Schindelin, git

On Fri, Aug 17, 2007 at 07:23:23PM +0200, Mike Hommey wrote:
> I think it would be better to put the fact that "If not provided..."
> *after* telling that you can provide author, committer, etc. by setting
> environment or editing the conf.

Yup, probably.  Patch?

--b.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] Clarify commit-tree documentation
  2007-08-17 17:36       ` J. Bruce Fields
@ 2007-08-17 20:13         ` Mike Hommey
  2007-08-17 23:51           ` Junio C Hamano
  0 siblings, 1 reply; 11+ messages in thread
From: Mike Hommey @ 2007-08-17 20:13 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Johannes Schindelin, git

As per http://marc.info/?l=git&m=118737219702802&w=2 , clarify
git-commit-tree documentation.

Signed-off-by: Mike Hommey <mh@glandium.org>
---
 Documentation/git-commit-tree.txt |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
index 5870c2c..6a328f4 100644
--- a/Documentation/git-commit-tree.txt
+++ b/Documentation/git-commit-tree.txt
@@ -51,9 +51,9 @@ A commit encapsulates:
 - 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.
+While parent object ids are provided on the command line, author and
+commiter information is taken from the following environment variables,
+if set:
 
 	GIT_AUTHOR_NAME
 	GIT_AUTHOR_EMAIL
@@ -65,12 +65,9 @@ either `.git/config` file, or using the following environment variables.
 
 (nb "<", ">" and "\n"s are stripped)
 
-In `.git/config` file, the following items are used for GIT_AUTHOR_NAME and
-GIT_AUTHOR_EMAIL:
-
-	[user]
-		name = "Your Name"
-		email = "your@email.address.xz"
+In case (some of) these environment variables are not set, the information
+is taken from the configuration items user.name and user.email, or, if not
+present, system user name and fully qualified hostname.
 
 A commit comment is read from stdin. If a changelog
 entry is not provided via "<" redirection, "git-commit-tree" will just wait
-- 
1.5.3.rc4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] Clarify commit-tree documentation
  2007-08-17 20:13         ` [PATCH] Clarify commit-tree documentation Mike Hommey
@ 2007-08-17 23:51           ` Junio C Hamano
  0 siblings, 0 replies; 11+ messages in thread
From: Junio C Hamano @ 2007-08-17 23:51 UTC (permalink / raw)
  To: Mike Hommey; +Cc: J. Bruce Fields, Johannes Schindelin, git

Sounds good.  Thanks.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-08-17 23:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17 16:30 Can't figure out some sense from the git-commit-tree man page Mike Hommey
2007-08-17 16:52 ` Johannes Schindelin
2007-08-17 16:56   ` Mike Hommey
2007-08-17 17:09     ` Johannes Schindelin
2007-08-17 17:16     ` Jakub Narebski
2007-08-17 17:04   ` J. Bruce Fields
2007-08-17 17:23     ` Mike Hommey
2007-08-17 17:36       ` J. Bruce Fields
2007-08-17 20:13         ` [PATCH] Clarify commit-tree documentation Mike Hommey
2007-08-17 23:51           ` Junio C Hamano
2007-08-17 16:55 ` Can't figure out some sense from the git-commit-tree man page Daniel Hulme

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).