This repository was archived by the owner on Sep 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 534
Patches for files without newline at the end are not appliable by git apply
#936
Labels
Comments
distorhead
added a commit
to werf/werf
that referenced
this issue
Sep 6, 2018
Go-git experiment failed for now. There is blocking issue to continue use go-git: * Corrupt patch generation for files without newline-at-the-end: src-d/go-git#936 And some non-blocking, but harmful: * Memory usage is too big on big repos: src-d/go-git#832. * Corrupt patch generation (solved in fork): src-d/go-git#932. Libgit2 is too complex to install or statically build into dapp. Also libgit2 has memory leaks. The decision is to use raw git command in a clean and efficient way. Implemented Diff operation.
distorhead
added a commit
to werf/werf
that referenced
this issue
Sep 6, 2018
Go-git experiment failed for now. There is blocking issue to continue use go-git: * Corrupt patch generation for files without newline-at-the-end: src-d/go-git#936 And some non-blocking, but harmful: * Memory usage is too big on big repos: src-d/go-git#832 * Corrupt patch generation (solved in fork): src-d/go-git#932 Libgit2 is too complex to install or statically build into dapp. Also libgit2 has memory leaks. The decision is to use raw git command in a clean and efficient way. Implemented Diff operation.
Found workaround: use |
Hi @distorhead! Can I start work on this? 🙂 |
Hi! Sure, I does not have any code contributions for this, unfortunately. |
With PHP, JavaScript and CSS file, i use PHP-CodeSniffer PHP-CodeSniffer : |
mcuadros
added a commit
that referenced
this issue
Oct 15, 2019
format: diff, Handle no newline at end of file. Fixes #936
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Go-git generates broken diff-s for files without newline at the end. These patches cannot be applied by
git apply
command.Original
git diff
command will generate patch with special line\ No newline at end of file
marker.Here is repo with example program in main.go: https://github.com/flant/go-git-test-2.
Gives:
The text was updated successfully, but these errors were encountered: