From: Thomas Adam <thomas@xteddy.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] merge: allow "-" as a short-hand for "previous branch"
Date: Fri, 8 Apr 2011 00:13:30 +0100 [thread overview]
Message-ID: <BANLkTikA3dFQpZWC=TC3+zp2FS=uBBxf0Q@mail.gmail.com> (raw)
In-Reply-To: <7vmxk164wd.fsf@alter.siamese.dyndns.org>
Hi,
On 8 April 2011 00:03, Junio C Hamano <gitster@pobox.com> wrote:
> Just like "git checkout -" is a short-hand for "git checkout @{-1}" to
> conveniently switch back to the previous branch, "git merge -" is a
> short-hand for "git merge @{-1}" to conveniently merge the previous branch.
>
> It will allow me to say:
>
> $ git checkout -b au/topic
> $ git am -s ./+au-topic.mbox
> $ git checkout pu
> $ git merge -
I agree this is is useful, but is there a danger of this being a
common typo, and people merging in previous branches a lot more often
than they ever intended? In the case of "git checkout -" that's not
as fatal, but if I ever mistype "git merge -" -- I'm now left with an
unraveling exercise to do.
Hopefully it won't be an issue, as it's no worse than mistyping branch
names -- I suppose it's the sheer length of "-" in this case which
leads to more potential for problems.
-- Thomas Adam
next prev parent reply other threads:[~2011-04-07 23:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-07 23:03 [PATCH] merge: allow "-" as a short-hand for "previous branch" Junio C Hamano
2011-04-07 23:13 ` Thomas Adam [this message]
2011-04-07 23:26 ` Junio C Hamano
2011-04-08 9:30 ` Michael J Gruber
2011-04-08 18:43 ` 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='BANLkTikA3dFQpZWC=TC3+zp2FS=uBBxf0Q@mail.gmail.com' \
--to=thomas@xteddy.org \
--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).