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

Bug 354800

Summary: Egit should support creating a patch against an arbitrary commit
Product: [Technology] EGit Reporter: James Blackburn <jamesblackburn+eclipse>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: angvoz.dev, carolynmacleod4, markus.kell.r, matthias.sohn, remy.suen, tomasz.zarna
Version: 1.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
screenshot none

Description James Blackburn CLA 2011-08-16 04:50:28 EDT
The egit patch wizard creates patches against the commit's parent.  This causes problems* for developers submitting patches to bugzilla as often the parent commit isn't part of the upstream repository.

The user is generally trying to do one of two things:

1) Produce a patch which corresponds to the changes against the remote's master as in:
git diff origin/master..master > patch

2) Produce a patch which corresponds to just the changes in the commit, but rebased onto origin/master:
git checkout -b patch_for_upstream origin/master
git cherry-pick <commit>
git diff HEAD^ > patch

Currently it's hard for users to create patches against the central repo's master without dropping to the command line.

*http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg22741.html
Comment 1 Dorin Ciuca CLA 2011-10-06 10:39:34 EDT
Created attachment 204673 [details]
screenshot

I found a workaround that it seems to work to get the patch diff only for your previous local commit.
- open history view, select your commit and choose “Open in Commit Viewer” from contextual menu
- select “diff” tab and there you have the diff (see attached)
- you can copy/paste the diff into a text file