git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jari Aalto <jari.aalto@cante.net>
To: git@vger.kernel.org
Cc: Jari Aalto <jari.aalto@cante.net>
Subject: [PATCH] git-rebase--interactive.sh: Remove option -n from tail
Date: Tue, 16 Oct 2007 19:57:17 +0300	[thread overview]
Message-ID: <1192553837-18302-4-git-send-email-jari.aalto@cante.net> (raw)
In-Reply-To: <1192553837-18302-3-git-send-email-jari.aalto@cante.net>

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 git-rebase--interactive.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 050140d..58e164c 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -10,6 +10,8 @@
 # The original idea comes from Eric W. Biederman, in
 # http://article.gmane.org/gmane.comp.version-control.git/22407
 
+TAIL="tail"
+
 USAGE='(--continue | --abort | --skip | [--preserve-merges] [--verbose]
 	[--onto <branch>] <upstream> [<branch>])'
 
@@ -204,7 +206,7 @@ nth_string () {
 make_squash_message () {
 	if test -f "$SQUASH_MSG"; then
 		COUNT=$(($(sed -n "s/^# This is [^0-9]*\([1-9][0-9]*\).*/\1/p" \
-			< "$SQUASH_MSG" | tail -n 1)+1))
+			< "$SQUASH_MSG" | $TAIL 1)+1))
 		echo "# This is a combination of $COUNT commits."
 		sed -n "2,\$p" < "$SQUASH_MSG"
 	else
-- 
1.5.3.2.81.g17ed

  reply	other threads:[~2007-10-16 17:07 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   ` [PATCH] git-commit.sh: " Jari Aalto
2007-10-16 16:57     ` Jari Aalto [this message]
2007-10-16 17:18     ` 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-4-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).