From: Jan Viktorin <viktorin@rehivetech.com>
To: git@vger.kernel.org
Subject: bad behaviour while using git rebase -i -p
Date: Fri, 9 Feb 2018 01:39:02 +0100 [thread overview]
Message-ID: <20180209013902.6702a0dd@jvn> (raw)
Hello,
since Git 2.16.1, I've noticed a bad behaviour of git rebase -i -p. It
screws up merge commits created with --log (or config merge.log = true)
in my history. A good merge commit with message like:
Merge branch 'test'
* test:
c
b
is changed after rebase (without touching that commit in any way) into:
Merge branch 'test' a git-rebase-p-test.sh test: c b
It seems, like the commit message is interpreted somehow - the '*'
character is expanded to the list of files in the current directory and
the original spacing is removed. This happens during my regular work.
Here is a code that seems to be reproducing this behaviour well:
git init
touch a
git add a
git commit -m a
git checkout -b test
# a new branch made to merge back to master later
touch b
git add b
git commit -m b
touch c
git add c
git commit -m c
git checkout master
git merge --no-edit --log test
git log -1
# everything looks good at this point
export GIT_SEQUENCE_EDITOR='sed "1s/pick/reword/" -i'
# we are rewording only the first commit...
export EDITOR='sed "s/b/x/" -i'
# ...and changing its message from "b" to "x"
git rebase -i HEAD^1 -p
git log -1
# here, you can see the bad merge commit message
Regards
Jan
next reply other threads:[~2018-02-09 0:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-09 0:39 Jan Viktorin [this message]
2018-02-09 2:32 ` bad behaviour while using git rebase -i -p Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180209013902.6702a0dd@jvn \
--to=viktorin@rehivetech.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).