Hello again,

thanks for your answer Pascal. I’m currently over it and trying to fix that 
merge issue.

I now resetted my local repository with  “git reset --hard origin“. Afterwards 
doing a “git checkout” command it says: “Your branch is up-to-date with 
‘origin/master”. (Exactly what I wanted.)

Pulling my upload from the Gerrit server with “git pull …“ GIT Bashs shows me, 
that all the files of my patch have been changed. (At this point everything is 
ok.)
(Commit Message is not showed in the download list, but as I understand 
everything correctly, this file will be automatically created, isn’t it?)

After another “git checkout HEAD” to check my patch download, GIT already tells 
me that my branch is head of “origin/master” by 2 commits. But I didn’t change 
anything after the pull command or is that the problem Pascal mentioned, that I 
perhaps did an pull, which was ahead of “origin/master”?

Can someone help me, who knows the GIT commands to solve this problem?
(I just want to pull my patch --> get the used commit message with its ChangeID 
from Gerrit --> edit the files --> uploading it as a new patch version again …)

Regards

T. Scholz


Von: [email protected] 
[mailto:[email protected]] Im Auftrag von Pascal Quantin
Gesendet: Mittwoch, 9. März 2016 18:42
An: Developer support list for Wireshark <[email protected]>
Betreff: Re: [Wireshark-dev] Trouble with COMMIT_EDITMSG



2016-03-09 14:30 GMT+01:00 FIXED-TERM Scholz Tobias (DC-IA/EAI3) 
<[email protected]<mailto:[email protected]>>:
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.

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to