Bug 342790 - No possibility to include Change-ID into commit message when reverting a commit
Summary: No possibility to include Change-ID into commit message when reverting a commit
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 0.12   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 6.8   Edit
Assignee: Thomas Wolf CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-14 01:56 EDT by Edwin Kempin CLA
Modified: 2023-09-23 10:14 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.