* (unknown)
@ 2008-06-16 20:02 amery
2008-06-16 20:26 ` [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems Jakub Narebski
0 siblings, 1 reply; 4+ messages in thread
From: amery @ 2008-06-16 20:02 UTC (permalink / raw)
>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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems
2008-06-16 20:02 (unknown) amery
@ 2008-06-16 20:26 ` Jakub Narebski
2008-06-16 20:43 ` Alejandro Mery
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Narebski @ 2008-06-16 20:26 UTC (permalink / raw)
To: Alejandro Mery; +Cc: git
<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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems
2008-06-16 20:26 ` [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems Jakub Narebski
@ 2008-06-16 20:43 ` Alejandro Mery
0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Mery @ 2008-06-16 20:43 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
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
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 5215 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems
@ 2008-06-17 11:43 Alejandro Mery
0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Mery @ 2008-06-17 11:43 UTC (permalink / raw)
To: git
head -<n> was deprecated by POSIX, and as modern versions of coreutils
package don't support it at least one exports _POSIX2_VERSION=199209
it's fails on some systems.
head -n<n> is portable, but sed <n>q is even more.
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..2c517ed 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=$(sed 1q "$dotest/final-commit")
if test $action = skip
then
--
1.5.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-17 11:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-16 20:02 (unknown) amery
2008-06-16 20:26 ` [PATCH] git-am: head -1 is obsolete and doesn't work on some new systems Jakub Narebski
2008-06-16 20:43 ` Alejandro Mery
-- strict thread matches above, loose matches on Subject: below --
2008-06-17 11:43 Alejandro Mery
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).