git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-commit.sh: Remove option -n from tail

From
Jari Aalto <jari.aalto@cante.net>
Date
Oct 16, 2007, 16:57 UTC
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 <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
Previous: Jari AaltoNext: Jari Aalto
Message 3 of 10 in “tail -n not supported in all OSs”
  1. tail -n not supported in all OSsJari Aalto, Oct 16, 2007
  2. git-am.sh: Remove option -n from tailJari Aalto, Oct 16, 2007
  3. git-commit.sh: Remove option -n from tailJari Aalto, Oct 16, 2007
  4. git-rebase--interactive.sh: Remove option -n from tailJari Aalto, Oct 16, 2007
  5. Johannes SchindelinOct 16, 2007
  6. David BrownOct 16, 2007
  7. YOSHIFUJI Hideaki / 吉藤英明Oct 16, 2007
  8. Johannes SchindelinOct 16, 2007
  9. Florian WeimerOct 16, 2007
  10. Theodore TsoOct 16, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.