Re: [PATCH v2 3/8] Teach git var about GIT_EDITOR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> Junio C Hamano wrote:
>
>>> 	core.logallrefupdates=true
>>>
>>> 	*** Please tell me who you are.
>>>
>>> 	Run
>>>
>>> 	  git config --global user.email "you@xxxxxxxxxxx"
>>> 	  git config --global user.name "Your Name"
>>>
>>> 	to set your account's default identity.
>>> 	Omit --global to set the identity only in this repository.
>>>
>>> 	GIT_COMMITTER_IDENT=user <user@domain> 1256952739 -0500
>>> 	GIT_AUTHOR_IDENT=user <user@domain> 1256952739 -0500
>>> 	warning: GIT_EDITOR: terminal is dumb, but EDITOR unset
>> 
>> Sorry, I cannot grok this example.  Is it supposed to be a transcript
>> of a user session?  What did the user type?
>
> Oh, sorry about that.  The user typed 'git var -l', and that is all
> output from that.  More realistic examples:
>
> $ # what scripts see
> $ git var -l 2>/dev/null
> gc.auto=0
> rerere.enabled
> merge.log
> merge.conflictstyle=diff3
> core.repositoryformatversion=0
> core.filemode=true
> core.bare=false
> core.logallrefupdates=true
> remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
> remote.origin.url=git://repo.or.cz/git
> branch.master.remote=origin
> branch.master.merge=refs/heads/master
> GIT_COMMITTER_IDENT=user <user@domain> 1256952739 -0500
> GIT_AUTHOR_IDENT=user <user@domain> 1256952739 -0500
> $
> $ # what scripts pass on to the user
> $ git var -l >/dev/null
>
> *** Please tell me who you are.
>
> Run
>
>   git config --global user.email "you@xxxxxxxxxxx"
>   git config --global user.name "Your Name"
>
> to set your account's default identity.
> Omit --global to set the identity only in this repository.
>
> warning: GIT_EDITOR: terminal is dumb, but EDITOR unset
> $ 

This is more readable.

But the user did not even ask for GIT_EDITOR.  Should it even mention
"unusable"?  or should it just say something like

	GIT_EDITOR=

without complaining?

For that matter, I also wonder if we can squelch the user.email one when
we are only listing the variables (I know it is not part of this topic,
but I can still wonder).

> Would a more friendly message be helpful here?  I am not sure how 'git
> var -l' gets used.  I never liked using it directly myself, mostly
> because the long list of configuration items can be overwhelming.

I think people run "git var -l", store the results in variables (think
Perl or Python script) and read from there, instead of making separate
invocations of "git var" for individual variables.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]