# (unknown)

3 messages from 2008-06-16 to 2008-06-16. Participants: amery@geeks.cl, Jakub Narebski, Alejandro Mery.
Thread: https://gitlist.dev/t/13984

## amery@geeks.cl, 2008-06-16 20:02

Subject: (unknown)
Message-ID: <1213646544.908600.7895.nullmailer@rafaella.geeks.cl>
URL: https://gitlist.dev/e/1213646544.908600.7895.nullmailer%40rafaella.geeks.cl

```
>From 25cb047690dd6101527cdfa6198dd6a6f93bf095 Mon Sep 17 00:00:00 2001
From: Alejandro Mery <amery@geeks.cl>
Date: Mon, 16 Jun 2008 20:27:14 +0200
Subject: [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems

http://www.opengroup.org/onlinepubs/009695399/utilities/head.html
---
 git-am.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index b48096e..797988f 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -421,7 +421,7 @@ do
 	else
 	    action=yes
 	fi
-	FIRSTLINE=$(head -1 "$dotest/final-commit")
+	FIRSTLINE=$(head -n1 "$dotest/final-commit")
 
 	if test $action = skip
 	then
-- 
1.5.4.3

```

## Jakub Narebski, 2008-06-16 20:26

Subject: Re: [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems
Message-ID: <m3tzftnn28.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3tzftnn28.fsf%40localhost.localdomain
In-Reply-To: <1213646544.908600.7895.nullmailer@rafaella.geeks.cl>

```
<amery@geeks.cl> writes:

> From 25cb047690dd6101527cdfa6198dd6a6f93bf095 Mon Sep 17 00:00:00 2001

This line is not needed (unless you use git-send-mail, or import patch
as mbox to your MUA), and it should be removed.

> From: Alejandro Mery <amery@geeks.cl>
> Date: Mon, 16 Jun 2008 20:27:14 +0200
> Subject: [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems

These headers should go as mailing list headers, which mean that your
MUA should generate proper from (if it cannot, the From: would have to
stay), and subject should go as email subject.

> http://www.opengroup.org/onlinepubs/009695399/utilities/head.html

We are not interested in theoretical POSIX compliance, see
CodingGuidelines.

Patch lacks signoff line, per SubmittingPatches

: Signed-off-by: Alejandro Mery <amery@geeks.cl>

> ---
>  git-am.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/git-am.sh b/git-am.sh
> index b48096e..797988f 100755
> --- a/git-am.sh
> +++ b/git-am.sh
> @@ -421,7 +421,7 @@ do
>  	else
>  	    action=yes
>  	fi
> -	FIRSTLINE=$(head -1 "$dotest/final-commit")
> +	FIRSTLINE=$(head -n1 "$dotest/final-commit")

For better portability it would be better use 'sed 1q' here instead.

: -	FIRSTLINE=$(head -1 "$dotest/final-commit")
: +	FIRSTLINE=$(sed -e 1q "$dotest/final-commit")


>  	if test $action = skip
>  	then
> -- 
> 1.5.4.3
> 

-- 
Jakub Narebski
Poland
ShadeHawk on #git

```

## Alejandro Mery, 2008-06-16 20:43

Subject: Re: [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems
Message-ID: <4856D089.1050608@geeks.cl>
URL: https://gitlist.dev/e/4856D089.1050608%40geeks.cl
In-Reply-To: <m3tzftnn28.fsf@localhost.localdomain>

```
Jakub Narebski wrote:
> <amery@geeks.cl> writes:
> 
>> From 25cb047690dd6101527cdfa6198dd6a6f93bf095 Mon Sep 17 00:00:00 2001
> 
> This line is not needed (unless you use git-send-mail, or import patch
> as mbox to your MUA), and it should be removed.
> 
>> From: Alejandro Mery <amery@geeks.cl>
>> Date: Mon, 16 Jun 2008 20:27:14 +0200
>> Subject: [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems
> 
> These headers should go as mailing list headers, which mean that your
> MUA should generate proper from (if it cannot, the From: would have to
> stay), and subject should go as email subject.

I'm really sorry about this, I was trying to send what git-format-patch 
generated using ubuntu's nullmailer, but it didn't work as expected (no 
git-send-email on this thing)

I'll have to fight more before sending another patch from here.

Alejandro Mery

```
