threads / patch / 28247

patcham: format is in $patch_format, not parse_patch

Subject: [PATCH] am: format is in $patch_format, not parse_patch

## tl;dr

3 messages between Aug 29, 2011 and Aug 29, 2011. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Giuseppe Bilotta· Aug 29, 2011, 15:22 UTC · lore

The error message given when the patch format was not recognized was wrong, since the variable checked was $parse_patch rather than $patch_format. Fix by checking the non-emptyness of the correct variable.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
 git-am.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-am.sh +1 −1
diff --git a/git-am.sh b/git-am.sh
index e78cb54..4fff195 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -312,7 +312,7 @@ split_patches ()
 		msgnum=
 		;;
 	*)
-		if test -n "$parse_patch" ; then
+		if test -n "$patch_format" ; then
 			clean_abort "$(eval_gettext "Patch format \$patch_format is not supported.")"
 		else
 			clean_abort "$(gettext "Patch format detection failed.")"
-- 
1.7.7.rc0.328.g626f7.dirty
Junio C Hamano· Aug 29, 2011, 16:12 UTC · re: Giuseppe Bilotta · lore

Re: [PATCH] am: format is in $patch_format, not parse_patch

Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:
> The error message given when the patch format was not recognized was
> wrong, since the variable checked was $parse_patch rather than
> $patch_format. Fix by checking the non-emptyness of the correct
> variable.
Thanks for a fix to a problem that is from more than two years ago ;-)
Giuseppe Bilotta· Aug 29, 2011, 16:46 UTC · re: Junio C Hamano · lore

Re: [PATCH] am: format is in $patch_format, not parse_patch

On Mon, Aug 29, 2011 at 6:12 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:
>
>> The error message given when the patch format was not recognized was
>> wrong, since the variable checked was $parse_patch rather than
>> $patch_format. Fix by checking the non-emptyness of the correct
>> variable.
>
> Thanks for a fix to a problem that is from more than two years ago ;-)

You're welcome. I'm actually surprised that wasn't something _I_ did by mistake ;-)

That part of the code isn't being stressed too much. I've just found another issue. Patch coming, plus another enhancement.

-- 
Giuseppe "Oblomov" Bilotta

← back to recent threads