Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 373975 - New file marked with error when applying a patch created by git-format-patch
Summary: New file marked with error when applying a patch created by git-format-patch
Status: CLOSED DUPLICATE of bug 123787
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact: Tomasz Zarna CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-12 11:43 EDT by Dani Megert CLA
Modified: 2012-06-14 09:20 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2012-03-12 11:43:25 EDT
There seems to be Git patches that have the version at the end (don't know yet how it got created), see e.g.:

https://bugs.eclipse.org/bugs/attachment.cgi?id=212117

This causes the apply patch wizard to treat the new file (ICompletionProposalSorter) as an error.


Steps:
1. clone the 'eclipse.platform.text' repository
2. import 'org.eclipse.jface.text'
3. apply the patch
Comment 1 Dani Megert CLA 2012-03-12 13:34:16 EDT
(In reply to comment #0)
> don't know yet how it got created), see e.g.:

See bug 350991 comment 34
Comment 2 Remy Suen CLA 2012-03-13 15:36:39 EDT
This already works when editing Java files. What are you programming in?
Comment 3 Remy Suen CLA 2012-03-13 15:42:55 EDT
(In reply to comment #2)
> This already works when editing Java files. What are you programming in?

Of course, this is the wrong bug. :) Should be for bug 374093.
Comment 4 Tomasz Zarna CLA 2012-04-17 09:42:08 EDT
This is not a valid format for the Eclipse Apply Patch Wizard. It's a unified diff, but the prefix and suffix make it hard to read by the wizard. It would get even worse if you created the patch for a revision rage. You should use EGit and the "workspace" header [1] to create an applicable patch. If you had encountered a problem then, I would have agreed the bug's severity is major, otherwise it's an enhancement request to me. In other words, it's not a _major_ loss of function since it never existed.

[1] bug 367735
Comment 5 Dani Megert CLA 2012-04-17 10:17:32 EDT
(In reply to comment #4)
> This is not a valid format for the Eclipse Apply Patch Wizard.

How should I know that?
Comment 6 Dani Megert CLA 2012-04-17 10:18:53 EDT
> You should use EGit and the "workspace" header [1] to create an applicable 
> patch.

OK, how do I use that functionality with a patch that someone attached to a bug?
Comment 7 Dani Megert CLA 2012-04-18 03:26:29 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > This is not a valid format for the Eclipse Apply Patch Wizard.
> 
> How should I know that?

This is bug 123787.
Comment 8 Tomasz Zarna CLA 2012-04-18 06:15:35 EDT
(In reply to comment #6)
> OK, how do I use that functionality with a patch that someone attached to a bug?

You ask the contributor to redo the patch. Just like you did in bug 350991 comment 35.
Comment 9 Dani Megert CLA 2012-04-18 07:10:18 EDT
(In reply to comment #8)
> (In reply to comment #6)
> > OK, how do I use that functionality with a patch that someone attached to a bug?
> 
> You ask the contributor to redo the patch. Just like you did in bug 350991
> comment 35.

:-)
Comment 10 Dani Megert CLA 2012-06-14 09:20:57 EDT

*** This bug has been marked as a duplicate of bug 123787 ***