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

[PATCH] rebase: replace antiquated sed invocation

From
Stephen Boyd <bebarino@gmail.com>
Date
Jan 25, 2010, 07:06 UTC
Message-ID
<1264403191-11523-1-git-send-email-bebarino@gmail.com>

Use the modern form of printing a commit subject instead of piping the output of rev-list to sed.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
---
 git-rebase.sh |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index eddc028..b5d9178 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -85,10 +85,8 @@ continue_merge () {
 			printf "Already applied: %0${prec}d " $msgnum
 		fi
 	fi
-	if test -z "$GIT_QUIET"
-	then
-		git rev-list --pretty=oneline -1 "$cmt" | sed -e 's/^[^ ]* //'
-	fi
+	test -z "$GIT_QUIET" &&
+	git log --format=%s -1 "$cmt"
 
 	prev_head=`git rev-parse HEAD^0`
 	# save the resulting commit so we can read-tree on it later
-- 
1.6.6.1.436.gaba7d
Message 1 of 1 in “rebase: replace antiquated sed invocation”
  1. rebase: replace antiquated sed invocationStephen Boyd, Jan 25, 2010

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.