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

From: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Date: Thu, 10 Mar 2016 09:32:48 +0100


2016-03-10 9:05 GMT+01:00 FIXED-TERM Scholz Tobias (DC-IA/EAI3) <fixed-term.Tobias.Scholz@xxxxxxxxxxxxxxx>:

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”?


Try getting your change as a cherry pick instead of a checkout. This should rebase it. In Gerrit GUI in the download section select "cherry pick". You should get a link that looks like this:
git fetch ssh://pascal@xxxxxxxxxxxxxxxxxx:29418/wireshark refs/changes/19/14119/3 && git cherry-pick FETCH_HEAD
 

 

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: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] Im Auftrag von Pascal Quantin
Gesendet: Mittwoch, 9. März 2016 18:42
An: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Betreff: Re: [Wireshark-dev] Trouble with COMMIT_EDITMSG

 

 

 

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.

 


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe