Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

[RFR] Remove 'No newline at end of file' from diffs #98

Merged
merged 1 commit into from
Oct 15, 2018

Conversation

Kmaschta
Copy link
Contributor

@Kmaschta Kmaschta commented Oct 14, 2018

The bug was initialy declared here: #79 (comment)

Explanation

In files that doesn't contain an empty line at the end of the file, GitHub notices it and display a small logo in the pull request.
Also, this no existing line is virtually added in the diff sent by the GitHub API (and by git btw) containing:

@@ -1 +1,3 @@
-# sedy-test
\\ No newline at end of file
+# sedy-test
+
+This repository is used to test [sedy](https://github.com/marmelab/sedy).

Sedy have to parse the informations of the diff sent by the GitHub API to find the line to edit the specified file.
So, this no existing line added in the diff diformed the correct line number.

This PR aims to remove this virtual line and fix the line count in the diff.

@Kmaschta Kmaschta added the bug label Oct 14, 2018
@alexisjanvier alexisjanvier merged commit 0dc1285 into master Oct 15, 2018
@alexisjanvier alexisjanvier deleted the fix-empty-lines-warnings branch October 15, 2018 07:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants