From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org, Tatyana Krasnukha <tatyana@synopsys.com>
Subject: Re: [PATCH 2/2] apply: handle Subversion diffs with /dev/null gracefully
Date: Thu, 15 Feb 2018 10:01:58 -0800 [thread overview]
Message-ID: <xmqqsha29lnt.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <7858c01a2c92a55f86611335bbdcc93c94bc69d2.1518654532.git.johannes.schindelin@gmx.de> (Johannes Schindelin's message of "Thu, 15 Feb 2018 01:29:34 +0100 (STD)")
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> } else {
> - if (!starts_with(line, "/dev/null\n"))
> + if (!is_dev_null(line))
> return error(_("git apply: bad git-diff - expected /dev/null on line %d"), state->linenr);
> }
Yup. This seems to be the last explicit/manual check with the
string "/dev/null" (instead of using is_dev_null(), which is how it
should be and already is done in codepaths that guesses -p value and
decides if it is a creation or a deletion patch).
Looks good. Will queue.
> diff --git a/t/t4135-apply-weird-filenames.sh b/t/t4135-apply-weird-filenames.sh
> index b14b8085786..c7c688fcc4b 100755
> --- a/t/t4135-apply-weird-filenames.sh
> +++ b/t/t4135-apply-weird-filenames.sh
> @@ -100,7 +100,7 @@ deleted file mode 100644
> -
> EOF
>
> -test_expect_failure 'apply handles a diff generated by Subversion' '
> +test_expect_success 'apply handles a diff generated by Subversion' '
> >Makefile &&
> git apply -p2 diff-from-svn &&
> test_path_is_missing Makefile
prev parent reply other threads:[~2018-02-15 18:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 0:29 [PATCH 0/2] Teach `git apply` to accept Subversion-generated diffs Johannes Schindelin
2018-02-15 0:29 ` [PATCH 1/2] apply: demonstrate a problem applying svn diffs Johannes Schindelin
2018-02-15 0:29 ` [PATCH 2/2] apply: handle Subversion diffs with /dev/null gracefully Johannes Schindelin
2018-02-15 18:01 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqsha29lnt.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=tatyana@synopsys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).