From: "Uwe Kleine-König" <ukleinek@informatik.uni-freiburg.de>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: when git-rebase -i fails to cherry-pick
Date: Tue, 24 Jul 2007 22:05:10 +0200 [thread overview]
Message-ID: <20070724200510.GA27610@informatik.uni-freiburg.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0707240005240.14781@racer.site>
Hello Johannes,
Johannes Schindelin wrote:
> > - If a cherry-pick fails, it tells me to resolve my conflicts, 'git add
> > <paths>' and to do 'git commit -c $sha1id'.
> >
> > But it doesn't tell me, how I continue to rebase after that.
> >
> > 'git rebase -i --continue' works.
>
> Actually, even "git rebase --continue" works. And you do not really have
> to commit, either, just updating your index is fine. In fact, if you say
> "git reset --hard", it will skip the commit.
OK, thanks.
> > - If a cherry-pick of a commit to be squashed fails, the instruction to
> > do 'git commit -c $sha1id' is wrong, because then I don't get both
> > message to squash.
>
> Yes, it is a leftover from the bad old days, when this script was called
> edit-patch-series, and I was a rebase hater.
>
> In the meantime, somebody on IRC explained to me how rebase works, and
> that rebase lovers were quite annoyed not to be able to just resolve the
> conflicts and "git rebase --continue".
>
> I'd appreciate if you prepared a patch with better explanations, and also
> reviewed the man page, if it is in good shape (and does not lie about the
> current behaviour).
It's on my todo list, but not the top item for git.
In the mean-time I found another nuisance:
After doing:
tmpdir=/tmp/repo
mkdir $tmpdir
cd $tmpdir
git init
for n in one two three four; do echo $n >> file; git add file;
git commit -m $n; done
git rebase -i HEAD~3 #squash four onto two
git rebase stops (as expected) when trying to apply four, at this stage
two is already commited.
The conflicting file looks as follows:
one
two
<<<<<<< HEAD:file
=======
three
four
>>>>>>> e7fbd8f... four:file
I currently have no idea how to improve this, but I miss the information
that the commit *adds* "four" and "three" is only context.
Resolving with:
echo one > file; echo two >> file; echo four >> file;
git add file; git rebase --continue
and typing a new log (e.g. two + four) git rebase stops once more (again
as expected) when trying to apply three, OK, resolving the conflict is
easy (one, two, three, four), git add file, git rebase --continue.
Looking at the resulting log, I have the following:
zeisberg@cassiopeia:/tmp/repo$ git log --pretty=oneline
145ce01e1cf3f4cb86cd0065c0d0d5b62b399ad4 three
cd082bca636efca17409be4d871d0971237df06c two + four
b6b985977db45e314509d94282597c2ff8029d3d two
15f8cbbb5a452b075b49f3dedbeaeb66668b8025 one
So the request to squash two + four was lost.
I will look at it when I'm done with git-sendemail ...
Best regards
Uwe
--
Uwe Kleine-König
main(){char*a="main(){char*a=%c%s%c;printf(a,34,a,34%c";printf(a,34,a,34
,10);a=",10);a=%c%s%c;printf(a,34,a,34,10);}%c";printf(a,34,a,34,10);}
next prev parent reply other threads:[~2007-07-24 20:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 22:54 when git-rebase -i fails to cherry-pick Uwe Kleine-König
2007-07-23 23:08 ` Johannes Schindelin
2007-07-24 20:05 ` Uwe Kleine-König [this message]
2007-07-24 20:43 ` [PATCH] rebase -i: fix interrupted squashing Johannes Schindelin
2007-07-27 17:18 ` Johannes Schindelin
2007-07-27 19:20 ` Junio C Hamano
2007-07-27 19:35 ` Johannes Schindelin
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=20070724200510.GA27610@informatik.uni-freiburg.de \
--to=ukleinek@informatik.uni-freiburg.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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).