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

Bug 410952

Summary: Patch generated by Orion is "corrupt" in command line Git tools (missing newline)
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: GitAssignee: Project Inbox <orion.git-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: major    
Priority: P3 CC: libingw
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-06-17 15:17:19 EDT
1. Libing generated this patch using the git-status page in Orion:
https://bugs.eclipse.org/bugs/attachment.cgi?id=232460
(Note: you should first reset your orion.client master to commit# ac8eac2 if you want to try applying this patch.)

2. I attempted to apply the patch using the command-line Git tools, but it failed:

> $ git apply ~/Desktop/bug410930Patch.txt --stat
> fatal: corrupt patch at line 45

3. I noticed the patch file has no newline at the EOF. If I add a newline, the patch applies successfully:

> $ git apply ~/Desktop/bug410930Patch_newline.txt --stat
>  .../web/orion/webui/splitter.js                    |   17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)

Orion should ensure that patches end with a newline, as that appears to be a requirement of the command line Git tools.
Comment 1 Mark Macdonald CLA 2013-06-17 15:26:24 EDT
Never mind. This patch file was not generated by Orion (since apparently we have no such feature), but copied & pasted out of the compare view.