git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@matthieu-moy.fr
Cc: Jeff King <peff@peff.net>,
	Aaron Greenberg <p@aaronjgreenberg.com>,
	git@vger.kernel.org
Subject: Re: [PATCH v2] branch: implement shortcut to delete last branch
Date: Mon, 26 Mar 2018 09:49:44 -0700	[thread overview]
Message-ID: <xmqqvadidbo7.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <86r2o7nh4i.fsf@matthieu-moy.fr> (git@matthieu-moy.fr's message of "Mon, 26 Mar 2018 14:41:49 +0200")

git@matthieu-moy.fr writes:

>> That said, I'd still be OK with it.
>
> I don't have objection either.

FWIW, I do not even buy the "destructive commands should force
spelling things out even more" argument in the first place.

    $ git checkout somelongtopicname
    $ work work work
    $ git checkout master && git merge -
    $ git branch -d -

would be a lot less error-prone than the user being forced to write
last step in longhand

    $ git branch -d someotherlongtopicname

and destroying an unrelated but similarly named branch.

So obviously I am OK with it, too.

As long as we do not regress end-user experience, that is.  For
example, "git merge @{-1}" in the above sequence would record the
fact that the resulting commit is a merge of 'somelongtopicname',
not literally "@{-1}", in its log message.  It would be a sad
regression if it suddenly starts to say "Merge branch '-'" [*1*],
for example.


[Reference]

*1* https://public-inbox.org/git/xmqqinnsegxb.fsf@gitster.mtv.corp.google.com/



      reply	other threads:[~2018-03-26 16:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23  2:09 [PATCH] branch: implement shortcut to delete last branch Aaron Greenberg
2018-03-23  2:09 ` Aaron Greenberg
2018-03-23  8:56 ` Jeff King
2018-03-23  9:00   ` Jeff King
2018-03-23 22:40   ` [PATCH v2] " Aaron Greenberg
2018-03-23 22:40     ` [PATCH] " Aaron Greenberg
2018-03-26  8:10     ` [PATCH v2] " Jeff King
2018-03-26 12:41       ` git
2018-03-26 16:49         ` Junio C Hamano [this message]

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=xmqqvadidbo7.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@matthieu-moy.fr \
    --cc=git@vger.kernel.org \
    --cc=p@aaronjgreenberg.com \
    --cc=peff@peff.net \
    /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).