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

3 messages from 2011-08-29 to 2011-08-29. Participants: Giuseppe Bilotta, Junio C Hamano.
Thread: https://gitlist.dev/t/28247

## Giuseppe Bilotta, 2011-08-29 15:22

Subject: [PATCH] am: format is in $patch_format, not parse_patch
Message-ID: <1314631326-11796-1-git-send-email-giuseppe.bilotta@gmail.com>
URL: https://gitlist.dev/e/1314631326-11796-1-git-send-email-giuseppe.bilotta%40gmail.com

```
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(-)

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, 2011-08-29 16:12

Subject: Re: [PATCH] am: format is in $patch_format, not parse_patch
Message-ID: <7vaaas6vtt.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vaaas6vtt.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1314631326-11796-1-git-send-email-giuseppe.bilotta@gmail.com>

```
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, 2011-08-29 16:46

Subject: Re: [PATCH] am: format is in $patch_format, not parse_patch
Message-ID: <CAOxFTcwcBgCNpwNNdsQXwE92w6948cfjwMTum03D+SJ0Rq-Yuw@mail.gmail.com>
URL: https://gitlist.dev/e/CAOxFTcwcBgCNpwNNdsQXwE92w6948cfjwMTum03D%2BSJ0Rq-Yuw%40mail.gmail.com
In-Reply-To: <7vaaas6vtt.fsf@alter.siamese.dyndns.org>

```
On Mon, Aug 29, 2011 at 6:12 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 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

```
