Re: [PATCH] Add git-sh-setup::set_editor()

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

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> On Thu, 19 Jul 2007, Adam Roben wrote:
>
>> This function can be used to set the GIT_EDITOR variable to the user's
>> preferred editor.
>
> Much nicer, thank you.
>
> However,
>
>> -	commit_editor=$(git config core.editor || echo ${VISUAL:-$EDITOR})
>> -	case "$commit_editor,$TERM" in
>> +	case "$GIT_EDITOR,$TERM" in
>>  	,dumb)
>
> This can no longer happen, since ...
>
>> +set_editor() {
>> +    GIT_EDITOR=$(git config core.editor || echo ${VISUAL:-${EDITOR:-vi}})
>> +    export GIT_EDITOR
>> +}

Strictly speaking it can happen when git has an empty string for
core.editor configured.  Not that the behavior chosen in this case
would make any sense, but just for the record...

-- 
David Kastrup

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

  Powered by Linux