Re: [PATCH] branch: description for non-existent branch errors

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

 



On 28/9/22 19:50, Junio C Hamano wrote:

> But stepping back a bit, in the longer term, we might want to change
> the behaviour of "git branch --edit-description", at least when no
> branch is specified on the command line and we are on an unborn
> branch.  It is merely the matter of setting a variable in the
> configuration file, so there may not be a strong reason to forbid
> 
>     $ git init trash
>     $ cd trash
>     $ git branch --edit-description
>     $ git commit --allow-empty -m initial
> 
> while allowing the same sequence with the last two commands reversed.
> 
> After all, renaming a branch with "branch -m" does not to require an
> existing ref that points at a commit, i.e.
> 
>     $ git init -b master trash
>     $ cd trash
>     $ git config branch.master.description "describes master"
>     $ git branch -m master main
> 
> does work fine and you end up with branch.main.description at the
> end.
 
Indeed. And "--set-upstream-to"? I haven't found any reason why we
shouldn't allow it for an unborn branch too. "--unset-upstream"
already works.

Those changes I think are worth doing along with the fix for the leak
of 'static const char *head'.

And then the error descriptions.  Not just the capitalization but
some similar but different messages too.

I'll reroll this path with the test for the current errors.

Thank you.

Un saludo.



[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