git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Rubén Justo" <rjusto@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] branch: description for non-existent branch errors
Date: Thu, 29 Sep 2022 01:59:35 +0200	[thread overview]
Message-ID: <a55cf3b7-218d-3c8b-ae1c-c09d49caeda8@gmail.com> (raw)
In-Reply-To: <xmqqzgejtmkd.fsf@gitster.g>

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.

  reply	other threads:[~2022-09-29  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 22:37 [PATCH] branch: description for non-existent branch errors Rubén Justo
2022-09-24 22:52 ` Rubén Justo
2022-09-26 18:12   ` Junio C Hamano
2022-09-26 23:35     ` Rubén Justo
2022-09-27 22:24       ` Junio C Hamano
2022-09-28 17:41         ` Junio C Hamano
2022-09-28 17:50         ` Junio C Hamano
2022-09-28 23:59           ` Rubén Justo [this message]
2022-09-29  1:56             ` Junio C Hamano
2022-09-30 22:47 ` [PATCH v2] " Rubén Justo
2022-10-01 12:43   ` Bagas Sanjaya
2022-10-02 21:28     ` Rubén Justo
2022-10-08  0:39   ` [PATCH v3] " Rubén Justo
2022-10-08  3:27     ` Eric Sunshine
2022-10-08  8:54       ` Rubén Justo
2022-10-09  5:05         ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=a55cf3b7-218d-3c8b-ae1c-c09d49caeda8@gmail.com \
    --to=rjusto@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).