Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » 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 15:24 Go to next message
Stevo Slavic is currently offline Stevo Slavic
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 1.7.7.6
- SpringSource Tool Suite 2.8.1.RELEASE (based on Eclipse Indigo 3.7.1)
- egit 1.1.0


Kind regards,
Stevo.
Re: Patches do not end with new line [message #956546 is a reply to message #796916] Wed, 24 October 2012 11:54 Go to previous message
Mark Dexter is currently offline Mark Dexter
Messages: 299
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?

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


Current Time: Fri Aug 22 21:35:02 EDT 2014

Powered by FUDForum. Page generated in 0.03317 seconds