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

[PATCH 1/2] rebase -i: Use : in expr command instead of match.

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Apr 27, 2008, 15:10 UTC
Message-ID
<20080427151043.GA57955@Hermes.local>

`expr match $str $pattern` failed on OS X, and we already use `expr $str : $pattern` in several other commands.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
---
 git-rebase--interactive.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 303b754..2a01182 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -192,7 +192,7 @@ peek_next_command () {
 }
 
 mark_to_ref () {
-	if expr match "$1" "^:[0-9][0-9]*$" >/dev/null
+	if expr "$1" : "^:[0-9][0-9]*$" >/dev/null
 	then
 		echo "$mark_prefix$(printf %d ${1#:})"
 	else
-- 
1.5.5.1.174.g8f57349
Message 1 of 1 in “rebase -i: Use : in expr command instead of match.”
  1. 1/2 rebase -i: Use : in expr command instead of match.Brian Gernhardt, Apr 27, 2008

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.