From: Tim Chase <git@tim.thechases.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git <git@vger.kernel.org>
Subject: Re: Using "-" for "previous branch" failing with rebase
Date: Mon, 17 Mar 2014 20:47:44 -0500 [thread overview]
Message-ID: <20140317204744.6ac795a0@bigbox.christie.dr> (raw)
In-Reply-To: <7vppll2uvp.fsf@alter.siamese.dyndns.org>
On 2014-03-16 23:37, Junio C Hamano wrote:
> Tim Chase <git@tim.thechases.com> writes:
>
> > Is this just an interface inconsistency or is there a some
> > technical reason this doesn't work (or, has it been
> > addressed/fixed, and just not pulled into Debian Stable's
> > 1.7.10.4 version of git)?
>
> It is merely that nobody thought "rebase" would benefit from such a
> short-hand, I think.
>
> Teach more commands that operate on branch names about "-"
> shorthand for "the branch we were previously on", like we did
> for "git merge -" sometime after we introduced "git checkout -"
>
> has been sitting in my "leftover bits" list at
>
> http://git-blame.blogspot.com/p/leftover-bits.html
>
> for quite some time. Hint, hint...
Not sure if the "Hint, hint" was intended for me, as I'm not exactly
a git hacker. I did find another place where I reached for it
instinctively (now that I use it regularly with checkout/merge):
git-diff.
git checkout some_branch
#hack
git commit -m "..."
git checkout other_branch
# hmm...what's different between these branches?
git diff -
which I would have expected to act something like
git diff some_branch..other_branch
Just for the archives.
-tkc
(or possibly the reverse)
next prev parent reply other threads:[~2014-03-18 1:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-15 20:29 Using "-" for "previous branch" failing with rebase Tim Chase
2014-03-17 6:37 ` Junio C Hamano
2014-03-18 1:47 ` Tim Chase [this message]
2014-03-18 18:59 ` 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=20140317204744.6ac795a0@bigbox.christie.dr \
--to=git@tim.thechases.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.
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).