]> git.madduck.net Git - etc/vim.git/commit

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix --diff output when encountering EOF (#1328)
authorRémi Verschelde <rverschelde@gmail.com>
Sun, 5 Apr 2020 05:02:57 +0000 (07:02 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Apr 2020 05:02:57 +0000 (22:02 -0700)
commit959848c17639bfc646128f6b582c5858164a5001
tree97bcb96138422f8942c337a617fdc9c684a11338
parent9ed2542e938c327a53c17f8932ee5fc53776ba31
Fix --diff output when encountering EOF (#1328)

`split("\n")` includes a final empty element `""` if the final line
ends with `\n` (as it should for POSIX-compliant text files), which
then became an extra `"\n"`.

`splitlines()` solves that, but there's a caveat, as it will split
on other types of line breaks too (like `\r`), which may not be
desired.

Fixes #526.
black.py
tests/data/blackd_diff.diff
tests/data/expression.diff