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

Bug 342790

Summary: No possibility to include Change-ID into commit message when reverting a commit
Product: [Technology] EGit Reporter: Edwin Kempin <edwin.kempin>
Component: CoreAssignee: Thomas Wolf <twolf>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: christian.halstrick, matthias.sohn, twolf
Version: 0.12   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/c/jgit/jgit/+/204242
https://git.eclipse.org/r/c/egit/egit/+/204247
Whiteboard:

Description Edwin Kempin CLA 2011-04-14 01:56:19 EDT
Steps how to reproduce:
1. open the History View
2. select one commit in the history, open the context menu and choose 'Revert Commit'
3. this immediately creates a new commit that undos the selected commit, there is no possibility to include a Change-ID for Gerrit into the commit message of this new commit

Workaround:
A Change-ID can be included into the new commit by amending it. However here it is strange that if the 'Compute Change-Id for Gerrit Code Review' is automatically selected due to the preference setting that a Change-ID should always be included, a Change-ID is NOT included into the commit message when the commit dialog is confirmed. Only when I first deselect and then reselect the 'Compute Change-Id for Gerrit Code Review' option I finally get a Change-ID.

I would expect that the 'Revert Commit' action at least includes a Change-Id into the commit message if I have configured in the preferences that should a Change-ID should always be included.
Comment 1 Christian Halstrick CLA 2011-06-29 07:58:32 EDT
If a repository is configured to work with gerrit then we should automatically generate a change-id.
Comment 2 Matthias Sohn CLA 2011-09-01 07:17:17 EDT
(In reply to comment #0)
> Workaround:
> A Change-ID can be included into the new commit by amending it. However here it
> is strange that if the 'Compute Change-Id for Gerrit Code Review' is
> automatically selected due to the preference setting that a Change-ID should
> always be included, a Change-ID is NOT included into the commit message when
> the commit dialog is confirmed. Only when I first deselect and then reselect
> the 'Compute Change-Id for Gerrit Code Review' option I finally get a
> Change-ID.

This works without deselecting and reselecting with current nightly build EGit 1.1.0.201108301258. So with this version (to be released soon with Indigo SR1)
the workaround is to amend the revert commit and click "Compute Change-Id for Gerrit Code Review" to insert the missing Change-Id.