From: Eli Barzilay <eli@barzilay.org>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: rebase --continue confusion
Date: Sun, 6 Jun 2010 19:42:40 -0400 [thread overview]
Message-ID: <19468.12912.509183.102990@winooski.ccs.neu.edu> (raw)
In-Reply-To: <20100606224601.GB11424@coredump.intra.peff.net>
On Jun 6, Jeff King wrote:
> On Sun, Jun 06, 2010 at 06:32:58PM -0400, Eli Barzilay wrote:
>
> > > > $ git add foo
> > > > $ git status -s
> > > > M foo
> > > > $ git commit --amend foo
> > > > # On branch master
> > > > # No changes
> > > > $ git status -s
> > > > M foo
> > >
> > > I'm confused. Is there some context for when you are issuing these
> > > commands? Because the "git commit --amend foo" should actually
> > > commit foo, and does for me.
> >
> > Heh, in that case it was more effective than I thought... My point in
> > the previous posts was also about missing information (in that case,
> > make `git add' tell you when adding it canceled previously added
> > changes, and also make `git status' tell you if you're in the middle
> > of a merge or rebase and in a clean state).
> >
> > In any case, here's the prelude to the above:
> >
> > $ mkdir t; cd t; git init
> > $ echo foo > foo; git add foo; git commit -m foo
> > $ echo bar > foo; git commit -o foo -m bar
> > $ echo foo > foo
>
> Ah, I see. Your problem has nothing to do with explicit pathnames (which
> I thought was the interesting bit from your snippet), but rather that
> you are amending it to the same as HEAD^.
Yes.
> Probably it would be helpful in the case of an amend to indicate
> what has happened (you have no changes, but it is not immediately
> obvious that you have no changes against HEAD^, not HEAD). We could
> even suggest "git reset HEAD^", which is probably what you want (the
> only other thing you could want is to create a commit with no
> changes, which we generally try to avoid).
Yes, that sounds reasonable. (When I realized what happened I
wondered why it didn't do the reset itself, but that would obviously
be a bad idea.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
next prev parent reply other threads:[~2010-06-06 23:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-30 0:59 rebase --continue confusion Dale Rowley
2010-05-30 12:44 ` Tim Visher
2010-05-31 0:14 ` skillzero
[not found] ` <20100530101926.3bac34c8jk@jk.gs@perceptron>
2010-05-31 19:31 ` [PATCH] git-am: suggest what to do with superfluous patches Junio C Hamano
2010-05-31 20:17 ` Ramkumar Ramachandra
2010-05-31 22:51 ` Jan Krüger
2010-06-06 13:10 ` rebase --continue confusion Eli Barzilay
2010-06-06 22:18 ` Jeff King
2010-06-06 22:32 ` Eli Barzilay
2010-06-06 22:46 ` Jeff King
2010-06-06 23:42 ` Eli Barzilay [this message]
2010-06-07 0:41 ` Jeff King
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=19468.12912.509183.102990@winooski.ccs.neu.edu \
--to=eli@barzilay.org \
--cc=git@vger.kernel.org \
--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.
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).