From: Jari Aalto Date: Tue, 16 Oct 2007 16:57:16 GMT Subject: [PATCH] git-commit.sh: Remove option -n from tail Message-ID: <1192553837-18302-3-git-send-email-jari.aalto@cante.net> In-Reply-To: <1192553837-18302-2-git-send-email-jari.aalto@cante.net> Signed-off-by: Jari Aalto --- 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 | -F | (-C|-c) | --amend] [-u] [-e] [--author ] [--template ] [[-i | -o] ...]' 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