Wireshark-dev: Re: [Wireshark-dev] Trouble with COMMIT_EDITMSG

From: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Date: Wed, 9 Mar 2016 18:41:32 +0100


2016-03-09 14:30 GMT+01:00 FIXED-TERM Scholz Tobias (DC-IA/EAI3) <fixed-term.Tobias.Scholz@xxxxxxxxxxxxxxx>:
Hey there,
 
I wanted to upload again a new patch version for my changes. Therefore I pulled like the first time the last patch version via „git pull …”, which I copied from the Gerrit Server. Everything works fine, except the problem, that my COMMIT_EDITMSG changes completely in comparison to the message file of the upload.
 
 
The content now looks like that:
 
Merge commit 'refs/changes/19/14119/3' of https://code.wireshark.org/review/wireshark
 
Change-Id: I82322f200e0c247bd8e2b36a2f15344055d0acc8
 
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#   (use "git push" to publish your local commits)
 
 
I did exactly the same, like my first new patch upload. (git pull -> making my changes -> git commit --amend -> git review –f)
Back then my COMMIT_EDITMSG didn’t change and the upload worked, so I am right now confused, why the entire content of the file has changed? If I would upload my changes with that file, a completely new change will be created due to the new ChangeID, won’t it?

Hi Tobias,

your tree is now "polluted" with a merge (this is the new change-id you see). You should have rebased your change instead to keep history linear (and keep your old change-id).
If you launch gitk you will be able to see visually that the history is no more linear.
Presumably you had a local commit (so you were ahead of origin/master by 1 commit) and did a git pull without the --rebase flag, which created a merge.
I guess to get rid of this you need to drop the local merge, and after rebase your local change on top of the origin/master changeset (but I'm not a Git guru).

Regards,
Pascal.