git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] Teach `git apply` to accept Subversion-generated diffs

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 15, 2018, 00:29 UTC
Message-ID
<cover.1518654532.git.johannes.schindelin@gmx.de>

They are accepted already, almost. With one exception: the ---/+++ lines contain not only the file names, but continue with a TAB and then the revision (or "working copy" or "nonexistent") in parenthesis.

We already handle these lines, except in the case of /dev/null. Let's handle the case gracefully where the diff contains a "--- /dev/null" line with a trailing comment.

This contribution came in via Pull Request to Git for Windows, from a first time contributor! Yes!

Johannes Schindelin (1):
  apply: demonstrate a problem applying svn diffs
Tatyana Krasnukha (1):
  apply: handle Subversion diffs with /dev/null gracefully
 apply.c                          |  2 +-
 t/t4135-apply-weird-filenames.sh | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
base-commit: b2e45c695d09f6a31ce09347ae0a5d2cdfe9dd4e
Published-As: https://github.com/dscho/git/releases/tag/apply-svn-diff-v1
Fetch-It-Via: git fetch https://github.com/dscho/git apply-svn-diff-v1
-- 
2.16.1.windows.1
Next: Johannes Schindelin
Message 1 of 4 in “Teach `git apply` to accept Subversion-generated diffs”
  1. 0/2 Teach `git apply` to accept Subversion-generated diffsJohannes Schindelin, Feb 15, 2018
  2. 1/2 apply: demonstrate a problem applying svn diffsJohannes Schindelin, Feb 15, 2018
  3. 2/2 apply: handle Subversion diffs with /dev/null gracefullyJohannes Schindelin, Feb 15, 2018
  4. Junio C HamanoFeb 15, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.