Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336791

Summary: Change-ID placeholder in commit message is not replaced for merge commits
Product: [Technology] EGit Reporter: Edwin Kempin <edwin.kempin>
Component: CoreAssignee: Stefan Lay <stefan.lay>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christian.halstrick, jens.baumgart, mathias.kinzler, stefan.lay
Version: 0.11   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Edwin Kempin CLA 2011-02-10 04:53:25 EST
Steps to reproduce:
1. have two branches with conflicting changes
2. merge the branches -> this results in a conflict
3. resolve the conflicts and do git add for the conflict resolution
4. open the commit dialog and check the 'Compute Change-Id for Gerrit Code Review' checkbox -> the Change-ID placeholder 'Change-Id: I0000000000000000000000000000000000000000' is inserted into the commit message
5. commit
6. look at the new commit in the history and see that the commit message still contains the Change-ID placeholder 'Change-Id: I0000000000000000000000000000000000000000'

What was expected:
It was expected that on commit a new Change-ID would be computed and inserted into the commit message at the place of the Change-ID placeholder.

Workaround:
Open the commit dialog once again and amend the commit with having the 'Compute Change-Id for Gerrit Code Review' checkbox checked again.
Comment 1 Jens Baumgart CLA 2011-02-14 04:08:13 EST
EGit uses JGit Commit command for committing merge commits ("normal" commit are currently done using deprecated GitIndex).
JGit commit command needs to provide a mechanism for replacing the initial change ids.
Comment 2 Mathias Kinzler CLA 2011-03-18 11:35:51 EDT
(In reply to comment #1)
> EGit uses JGit Commit command for committing merge commits ("normal" commit are
> currently done using deprecated GitIndex).
> JGit commit command needs to provide a mechanism for replacing the initial
> change ids.

Is this fixed then with the new CommitOperation?
Comment 3 Jens Baumgart CLA 2011-03-22 08:59:19 EDT
Fix proposed:  http://egit.eclipse.org/r/2883
Comment 4 Stefan Lay CLA 2011-03-28 09:31:56 EDT
This works now with 8a0901053fc43abfef366b0a9399cdbb797a8b7b