git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael Haggerty <mhagger@alum.mit.edu>,
	Mark Jason Dominus <mjd@plover.com>,
	git@vger.kernel.org
Subject: Re: BUG 1.7.9: git branch fails to create new branch when --edit-description is used
Date: Sat, 28 Jan 2012 22:18:44 -0500	[thread overview]
Message-ID: <20120129031843.GA1347@sigill.intra.peff.net> (raw)
In-Reply-To: <7vbopoxp5q.fsf@alter.siamese.dyndns.org>

On Fri, Jan 27, 2012 at 11:27:29PM -0800, Junio C Hamano wrote:

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

  reply	other threads:[~2012-01-29  3:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 21:52 BUG 1.7.9: git branch fails to create new branch when --edit-description is used Mark Jason Dominus
2012-01-27 23:21 ` Junio C Hamano
2012-01-28  6:46   ` Michael Haggerty
2012-01-28  7:27     ` Junio C Hamano
2012-01-29  3:18       ` Jeff King [this message]
2012-01-29  6:30       ` Michael Haggerty
2012-01-29  6:42         ` Junio C Hamano
2012-01-29 10:11           ` Michael Haggerty
2012-01-29 21:49         ` 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

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

  git send-email \
    --in-reply-to=20120129031843.GA1347@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mhagger@alum.mit.edu \
    --cc=mjd@plover.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.
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 NNTP newsgroup(s).