From: Anton <Anton.Sharonov@gmail.com>
To: git@vger.kernel.org
Subject: rebase failure if commit message looks like a patch
Date: Tue, 27 Jan 2009 17:50:43 +0000 (UTC) [thread overview]
Message-ID: <loom.20090127T173025-125@post.gmane.org> (raw)
I have found a strange behaviour of "git rebase", present in following versions:
git 1.6.1, linux,
git 1.6.0.4, cygwin
if the commit message of one of revisions on local branch
containing something, what looks like patch:
------------------ bad-commit-message { ---------------
changeset a1 - feature added
--- a0 2009-01-25 10:09:05.953125000 +0100
+++ ./r/a 2009-01-25 10:15:20.093750000 +0100
@@ -1,5 +1,5 @@
-1
+1 - upstream
2
3
4
-5
+5 - feature
------------------ bad-commit-message } ---------------
Following shell script reproduces the bug for me:
------------------ show-bug.sh { ---------------
#!/bin/bash
rm -rf r # clean-up
mkdir r # repo dir
cd r
git init
cd ..
cp a0 r/a
cd r
git add a
git ci -m "initial addition of a0"
git br feature
git co feature
cd ..
cp a1 r/a
cd r
git add a
## no bug
#git ci -m "changeset a1 - feature added"
# bug
git ci -F ../bad-commit-message
git co master
cd ..
cp a2 r/a
cd r
git add a
git ci -m "changeset a2 - upstream revision"
git co feature
git rebase master
------------------ show-bug.sh } ---------------
produces the error on final rebase attempt:
First, rewinding head to replay your work on top of it...
Applying: changeset a1 - feature added
error: r/a: does not exist in index
fatal: sha1 information is lacking or useless (r/a).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001.
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
In case one uses
# no bug
git ci -m "changeset a1 - feature added"
instead of
# bug
git ci -F ../bad-commit-message
The final rebase succeded !
Content of other files:
---------------- a0 { -------------------
1
2
3
4
5
---------------- a0 } -------------------
---------------- a1 { -------------------
1
2
3
4
5 - feature
---------------- a1 } -------------------
---------------- a2 { -------------------
1 - upstream
2
3
4
5
---------------- a2 } -------------------
--
Anton
next reply other threads:[~2009-01-27 17:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-27 17:50 Anton [this message]
2009-01-27 18:15 ` rebase failure if commit message looks like a patch 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=loom.20090127T173025-125@post.gmane.org \
--to=anton.sharonov@gmail.com \
--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