From: Michael J Gruber <michaeljgruber+gmane@fastmail•fm>
To: git@vger•kernel.org
Subject: Re: git-rebase eats empty commits
Date: Wed, 16 Jul 2008 11:24:38 +0200 [thread overview]
Message-ID: <487DBE56.9020201@fastmail.fm> (raw)
In-Reply-To: <20080715201902.GC6244@leksak.fem-net>
[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]
Stephan Beyer venit, vidit, dixit 15.07.2008 22:19:
> Hi,
...
> 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)
How would an empty commit produce untracked files? You seem to be
testing something different.
I reattach the test case from my original post, as well as the log of
runs with git 1.5.6.3: once with rebase and once with rebase -i.
Uuuh, doh: I interpreted
Finished one cherry-pick.
# Not currently on any branch.
nothing to commit (working directory clean)
Could not apply e1f497c... empty 1
8d0c67a675bc65d375e8a9d019500bb2a16fb1e9 rewritten 1
as the end of the (interactive) rebase operation! Nothing indicated it
was interrupted: no message and no git status output. It all looked like
a failed rebase.
Now, thanks to your persistence, I tried going ahead with commit --amend
and rebase --continue, and all went fine (stopped again for empty 2,
giving no clue; amend & cont).
So, you're right: cherry-pick stops at empty commits, so that rebase -i
is the way to go. rebase (non-i) uses format-patch resp. merge (-m),
which eat empty commits.
I recall some discussion about informative rb-i messages, may upcoming
git would have saved me and will save others from this misinterpretation.
Thanks!
Michael
[-- Attachment #2: empty.sh --]
[-- Type: application/x-shellscript, Size: 400 bytes --]
[-- Attachment #3: empty.log --]
[-- Type: text/x-log, Size: 816 bytes --]
Initialized empty Git repository in /tmp/mjg/t/empty/.git/
Created initial commit 6b9e2af: 1
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
Created commit 8387962: empty 1
Created commit 6c4c3fe: 2
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 b
Created commit 3521900: empty 2
3521900fb7b032aa9e1f5a50a82f71785aa5c208 empty 2
6c4c3fe8b7619e1107256d0b47d0f419c05ceb69 2
8387962b740bb47662dd866eb57b4fe5ad21b355 empty 1
6b9e2afad8bed27378f0c9d23e77631be8447d37 1
Switched to a new branch "temp"
Created commit 1cced89: rewritten 1
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
First, rewinding head to replay your work on top of it...
Applying 2
a4116113335fc6be47fb9f8481547ea0923ac09d 2
1cced892a90024f4230a9f7aec1989ffe0b6c16f rewritten 1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: empty-i.log --]
[-- Type: text/x-log; name="empty-i.log", Size: 873 bytes --]
Initialized empty Git repository in /tmp/mjg/t/empty/.git/
Created initial commit 2796c9d: 1
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
Created commit e1f497c: empty 1
Created commit b3867ae: 2
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 b
Created commit 2edad43: empty 2
2edad436286f39e407b83bbb448b3aa62b91aeb9 empty 2
b3867ae2a345ab30bfd68a1c7e0e19999a1eb9eb 2
e1f497c4ee7a040162faa7dcc2b6d8e41d5fd920 empty 1
2796c9d9f8fced86134e5b36462916c938c6f819 1
Switched to a new branch "temp"
Created commit 8d0c67a: rewritten 1
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
Rebasing (1/3)\rAlready uptodate!
Finished one cherry-pick.
# Not currently on any branch.
nothing to commit (working directory clean)
Could not apply e1f497c... empty 1
8d0c67a675bc65d375e8a9d019500bb2a16fb1e9 rewritten 1
prev parent reply other threads:[~2008-07-16 9:25 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
2008-07-16 9:24 ` Michael J Gruber [this message]
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=487DBE56.9020201@fastmail.fm \
--to=michaeljgruber+gmane@fastmail$(echo .)fm \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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