Bug 440211 - Add the "Add Change-Id" and "Add Signed-off-by" buttons to the reword, squash and fixup dialogs used in interactive rebase
Summary: Add the "Add Change-Id" and "Add Signed-off-by" buttons to the reword, squash...
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 6.1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 475078 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-23 08:14 EDT by Matthias Sohn CLA
Modified: 2022-02-07 02:58 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Sohn CLA 2014-07-23 08:14:54 EDT
We should add the "Add Change-Id" and "Add Signed-off-by" buttons available in the Staging View and Commit Dialog also in the reword, squash and fixup dialogs used  during interactive rebase. At the moment users have to use "edit" instead of "reword", "squash" or "fixup" if they want to add a Gerrit change-Id or sign off a change (or type these footers manually) which is cumbersome.
Comment 1 Mykola Nikishov CLA 2015-06-30 15:54:57 EDT
[Batch change] Remove pre-3.7 Target Milestones

If anyone on CC list is going to fix/implement this, please assign a new 3.7+ target milestone.
Comment 2 Max Hohenegger CLA 2015-08-24 14:21:03 EDT
*** Bug 475078 has been marked as a duplicate of this bug. ***
Comment 3 Thomas Wolf CLA 2022-02-02 18:23:12 EST
The new commit message preview should also be available in the CommitMessageEditorDialog, and the dialog should obey the hard-wrap preference (not sure it whether it does already).
Comment 4 Thomas Wolf CLA 2022-02-03 07:08:07 EST
For the Change-Id, there is the problem that this is done during commit (and cannot be done before if it is to be done properly; it's a SHA1 including the tree and parent commit ID). So even if the "reword" dialog has this button and inserts the "Change-Id: I0000000000000000000000000000000000000000" footer, there is nothing to tell the CommitCommand later on that is should replace that. (No way to customize the commit command with CommitCommand.setInsertChangeId(true).)

I see two ways to resolve this:

1. Let CommitCommand examine the commit message, and do it automatically if
   there is a "Change-Id: I0000000000000000000000000000000000000000" footer.
2. Augment the InteractiveHandler2.ModifyResult in JGit with a boolean
   setChangeId() method, and query it everywhere in JGit such a handler
   is called, and then set CommitCommand.setInsertChangeId() there.

(1) would have the advantage that there would never be any commit with a Change-Id footer with all zeroes, it doesn't require any interface changes in JGit, and it is a single modification in CommitCommand. (2) is somewhat less opinionated. But changes have to be made in several places in EGit and JGit.

@Matthias, any preference?
Comment 5 Eclipse Genie CLA 2022-02-04 07:44:59 EST
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/190444
Comment 6 Eclipse Genie CLA 2022-02-04 07:54:13 EST
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/190446
Comment 7 Thomas Wolf CLA 2022-02-04 08:24:50 EST
(In reply to Eclipse Genie from comment #5)
> New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/190444

I've decided on (2) from comment 4. Turns out that it isn't that much work in JGit, and EGit's in-memory rebase for the reword operation doesn't use CommitCommand anyway.