From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
To: Brandon Casey <drafnel@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] builtin/apply.c: report error on failure to recognize input
Date: Sun, 04 Dec 2011 15:30:16 +0200 [thread overview]
Message-ID: <1323005418.9400.49.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <1322944550-27344-2-git-send-email-drafnel@gmail.com>
On Sat, 2011-12-03 at 14:35 -0600, Brandon Casey wrote:
> When git apply is passed something that is not a patch, it does not produce
> an error message or exit with a non-zero status if it was not actually
> "applying" the patch i.e. --check or --numstat etc were supplied on the
> command line.
>
> Fix this by producing an error when apply fails to find any hunks whatsoever
> while parsing the patch.
>
> This will cause some of the output formats (--numstat, --diffstat, etc) to
> produce an error when they formerly would have reported zero changes and
> exited successfully. That seems like the correct behavior though. Failure
> to recognize the input as a patch should be an error.
>
> Plus, add a test.
>
> Reported-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> Signed-off-by: Brandon Casey <drafnel@gmail.com>
Brandon, Thanks a lot for picking this. I did not reply because I did
not have time to look at this after your review yet, it was in my TODO
list. But I am happy you picked this and fixed the issue.
Tested-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
--
Best Regards,
Artem Bityutskiy
next prev parent reply other threads:[~2011-12-04 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-03 20:35 [PATCH 1/2] t/t4131-apply-fake-ancestor.sh: fix broken test Brandon Casey
2011-12-03 20:35 ` [PATCH 2/2] builtin/apply.c: report error on failure to recognize input Brandon Casey
2011-12-04 13:30 ` Artem Bityutskiy [this message]
2011-12-04 15:39 ` Brandon Casey
2011-12-05 19:27 ` Junio C Hamano
2011-12-05 22:38 ` Brandon Casey
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1323005418.9400.49.camel@sauron.fi.intel.com \
--to=artem.bityutskiy@linux.intel.com \
--cc=drafnel@gmail.com \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).