Bug 354800 - Egit should support creating a patch against an arbitrary commit
Summary: Egit should support creating a patch against an arbitrary commit
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 1.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-16 04:50 EDT by James Blackburn CLA
Modified: 2011-10-18 12:00 EDT (History)
6 users (show)

See Also:


Attachments
screenshot (24.17 KB, image/png)
2011-10-06 10:39 EDT, Dorin Ciuca CLA
no flags Details

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