From: Stephan Beyer <s-beyer@gmx.net>
To: Michael J Gruber <michaeljgruber+gmane@fastmail.fm>
Cc: git@vger.kernel.org
Subject: Re: git-rebase eats empty commits
Date: Tue, 15 Jul 2008 22:19:02 +0200 [thread overview]
Message-ID: <20080715201902.GC6244@leksak.fem-net> (raw)
In-Reply-To: <g5fpnm$3jb$1@ger.gmane.org>
Hi,
Michael J Gruber wrote:
> Stephan Beyer venit, vidit, dixit 13.07.2008 00:12:
>> To sum up, use rebase -i and when it's pausing, do "git commit --allow-empty"
>> and then "git rebase --continue" and you have what you want.
>
> I assume this is with git from master? With git 1.5.6.2 rebase -i
> doesn't stop there, not even when I change "pick" to "edit"!
Hmm, in fact this is with my git from Debian, from master and my
sequencer-based one:
$ /usr/bin/git --version
git version 1.5.6
$ ./git --version
git version 1.5.6.3.350.g6c11a
$ git --version
git version 1.5.6.3.506.g902dd
And, btw, the reason of this behavior is no special case in rebase-i,
it's just that git-cherry-pick fails (exit status != 0), if you pick an
empty commit (and then rebase-i will pause because of conflict). And
*this* is because builtin-revert.c runs git-commit without --allow-empty.
This has never changed, so I cannot believe that the behavior changed in
any version of git. Or I am missing a point.
$ git cherry-pick empty # empty is an empty commit tagged as "empty"
Already uptodate!
Finished one cherry-pick.
# Not currently on any branch.
# Untracked files:
[...]
nothing added to commit but untracked files present (use "git add" to track)
$ echo $?
1
$ EDITOR=touch git commit --allow-empty
Created commit 145f1d0: empty
The same happens when doing rebase -i instead of cherry-pick.
Regards,
Stephan
--
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F
next prev parent reply other threads:[~2008-07-15 20:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-08 13:59 git-rebase eats empty commits Michael J Gruber
2008-07-12 22:12 ` Stephan Beyer
2008-07-14 15:01 ` Michael J Gruber
2008-07-15 20:19 ` Stephan Beyer [this message]
2008-07-16 9:24 ` Michael J Gruber
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=20080715201902.GC6244@leksak.fem-net \
--to=s-beyer@gmx.net \
--cc=git@vger.kernel.org \
--cc=michaeljgruber+gmane@fastmail.fm \
/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).