git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: BUG 1.7.9: git branch fails to create new branch when --edit-description is used

From
Jeff King <peff@peff.net>
Date
Jan 29, 2012, 03:18 UTC
Message-ID
<20120129031843.GA1347@sigill.intra.peff.net>
In-Reply-To
<7vbopoxp5q.fsf@alter.siamese.dyndns.org>
On Fri, Jan 27, 2012 at 11:27:29PM -0800, Junio C Hamano wrote:
Show 7 quoted lines
> > Given this design, shouldn't "git branch --edit-description" fail if the
> > branch doesn't already exist?
> 
> The only use scenario in the original design was to have a way to store
> the description given a branch name, and giving a description to a branch
> that does not yet exist is outside the scope of the design. So it all
> boils down to what is the most convenient and the simplest to explain.

How do we define "branch exists"? That the ref exists? What about a HEAD that points to a branch-to-be-born?

Specifically, I am wondering whether this:
  $ git init
  $ git branch --edit-description

should work. Right now it edits the description for "master", even though you haven't yet committed to it.

-Peff
Previous: Junio C HamanoNext: Michael Haggerty
Message 5 of 9 in “BUG 1.7.9: git branch fails to create new branch when --edit-description is used”
  1. Mark Jason DominusJan 27, 2012
  2. Junio C HamanoJan 27, 2012
  3. Michael HaggertyJan 28, 2012
  4. Junio C HamanoJan 28, 2012
  5. Jeff KingJan 29, 2012
  6. Michael HaggertyJan 29, 2012
  7. Junio C HamanoJan 29, 2012
  8. Michael HaggertyJan 29, 2012
  9. Junio C HamanoJan 29, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.