From: Jari Aalto <jari.aalto@cante.net>
To: git@vger.kernel.org
Cc: Jari Aalto <jari.aalto@cante.net>
Subject: [PATCH] git-commit.sh: Remove option -n from tail
Date: Tue, 16 Oct 2007 19:57:16 +0300 [thread overview]
Message-ID: <1192553837-18302-3-git-send-email-jari.aalto@cante.net> (raw)
In-Reply-To: <1192553837-18302-2-git-send-email-jari.aalto@cante.net>
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
git-commit.sh | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/git-commit.sh b/git-commit.sh
index fcb8443..637cf48 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -3,6 +3,8 @@
# Copyright (c) 2005 Linus Torvalds
# Copyright (c) 2006 Junio C Hamano
+TAIL="tail"
+
USAGE='[-a | --interactive] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit> | --amend] [-u] [-e] [--author <author>] [--template <file>] [[-i | -o] <path>...]'
SUBDIRECTORY_OK=Yes
. git-sh-setup
@@ -442,10 +444,10 @@ t)
s/^/Signed-off-by: /
')
blank_before_signoff=
- tail -n 1 "$GIT_DIR"/COMMIT_EDITMSG |
+ $TAIL 1 "$GIT_DIR"/COMMIT_EDITMSG |
grep 'Signed-off-by:' >/dev/null || blank_before_signoff='
'
- tail -n 1 "$GIT_DIR"/COMMIT_EDITMSG |
+ $TAIL 1 "$GIT_DIR"/COMMIT_EDITMSG |
grep "$sign"$ >/dev/null ||
printf '%s%s\n' "$blank_before_signoff" "$sign" \
>>"$GIT_DIR"/COMMIT_EDITMSG
--
1.5.3.2.81.g17ed
next prev parent reply other threads:[~2007-10-16 17:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 16:57 [PATCH] tail -n not supported in all OSs Jari Aalto
2007-10-16 16:57 ` [PATCH] git-am.sh: Remove option -n from tail Jari Aalto
2007-10-16 16:57 ` Jari Aalto [this message]
2007-10-16 16:57 ` [PATCH] git-rebase--interactive.sh: " Jari Aalto
2007-10-16 17:18 ` [PATCH] git-commit.sh: " Johannes Schindelin
2007-10-16 17:12 ` [PATCH] tail -n not supported in all OSs David Brown
2007-10-16 17:16 ` YOSHIFUJI Hideaki / 吉藤英明
2007-10-16 17:19 ` Johannes Schindelin
2007-10-16 20:37 ` Florian Weimer
2007-10-16 22:06 ` Theodore Tso
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1192553837-18302-3-git-send-email-jari.aalto@cante.net \
--to=jari.aalto@cante.net \
--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.
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).