Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Patches do not end with new line(Patches do not end with new line - git reports them as corrupt)
Patches do not end with new line [message #796916] Sun, 12 February 2012 20:24 Go to next message
Stevo Slavic is currently offline Stevo SlavicFriend
Messages: 21
Registered: July 2009
Junior Member
A patch created using egit from commit in history, when applied using git (command line) check fails reporting that last line in the patch is corrupt. After appending a new line at the end of the patch file, git accepts patch as valid.

Does this has to do something with my local configuration, am I doing something wrong, or is this a bug that could be fixed in egit/jgit?

Environment used includes:
- git version
- SpringSource Tool Suite 2.8.1.RELEASE (based on Eclipse Indigo 3.7.1)
- egit 1.1.0

Kind regards,
Re: Patches do not end with new line [message #956546 is a reply to message #796916] Wed, 24 October 2012 15:54 Go to previous message
Mark Dexter is currently offline Mark DexterFriend
Messages: 324
Registered: July 2009
Senior Member
I know this is an old topic, but I just found this same issue. In testing with Eclipse 4.2.1 (Juno SR1) it still is the same. Patches made with Team->Create Patch are missing a blank line at the end so they cannot be applied with the command-line git apply command until they are manually edited. I could not find a bug report for this. Does anyone know if there is one? If not, should we enter one?

While we are on the subject of applying patches, I have one other question. In Eclipse, I have to manually change the "Ignore leading path name segements" to 1 each time I apply a Git patch. Wouldn't it be nice if we have a place in Preferences to set up a default value for this value?

Previous Topic:Problem with exception for ls-remote
Next Topic:EGit and symbolic links
Goto Forum:

Current Time: Mon Sep 20 23:50:58 GMT 2021

Powered by FUDForum. Page generated in 0.09513 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top