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

[PATCH 1/5] Avoid a few unportable, needlessly nested "...`...".

From
RWRalf Wildenhues <ralf.wildenhues@gmx.de>
Date
Nov 6, 2007, 20:17 UTC
Message-ID
<20071106201707.GB6361@ins.uni-bonn.de>
In-Reply-To
<20071106201518.GA6361@ins.uni-bonn.de>
Some shells wrongly interpret double-quote backquote double-quote
nesting.  OTOH, the right hand side of an assignment is never split
in words, so the outer double quotes are needless there.
---
 git-rebase--interactive.sh |    2 +-
 git-request-pull.sh        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 76dc679..ecc6778 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -391,7 +391,7 @@ do
 	-s|--strategy)
 		case "$#,$1" in
 		*,*=*)
-			STRATEGY="-s `expr "z$1" : 'z-[^=]*=\(.*\)'`" ;;
+			STRATEGY="-s "`expr "z$1" : 'z-[^=]*=\(.*\)'` ;;
 		1,*)
 			usage ;;
 		*)
diff --git a/git-request-pull.sh b/git-request-pull.sh
index a992430..ec367d7 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -24,7 +24,7 @@ headrev=`git rev-parse --verify "$head"^0` || exit
 merge_base=`git merge-base $baserev $headrev` ||
 die "fatal: No commits in common between $base and $head"
 
-url="`get_remote_url "$url"`"
+url=`get_remote_url "$url"`
 branch=`git peek-remote "$url" \
 	| sed -n -e "/^$headrev	refs.heads./{
 		s/^.*	refs.heads.//
-- 
1.5.3.5.561.g140d
Previous: Ralf WildenhuesNext: Ralf Wildenhues
Message 2 of 38 in “some shell portability fixes”
  1. 0/5 some shell portability fixesRalf Wildenhues, Nov 6, 2007
  2. 1/5 Avoid a few unportable, needlessly nested "...`...".Ralf Wildenhues, Nov 6, 2007
  3. 2/5 Fix sed script to work with AIX sed.Ralf Wildenhues, Nov 6, 2007
  4. Ralf WildenhuesNov 6, 2007
  5. Ralf WildenhuesNov 6, 2007
  6. Junio C HamanoNov 6, 2007
  7. Add Documentation/CodingStyleJohannes Schindelin, Nov 6, 2007
  8. Andreas EricssonNov 7, 2007
  9. Junio C HamanoNov 7, 2007
  10. Andreas EricssonNov 7, 2007
  11. Add Documentation/CodingStyleJohannes Schindelin, Nov 7, 2007
  12. Robin RosenbergNov 7, 2007
  13. Add Documentation/CodingGuidelinesJohannes Schindelin, Nov 7, 2007
  14. Junio C HamanoNov 7, 2007
  15. Add Documentation/CodingGuidelinesJohannes Schindelin, Nov 8, 2007
  16. Junio C HamanoNov 8, 2007
  17. Johannes SchindelinNov 7, 2007
  18. Wincent ColaiutaNov 7, 2007
  19. Andreas EricssonNov 7, 2007
  20. Jon LoeligerNov 7, 2007
  21. Johannes SchindelinNov 7, 2007
  22. Mike RalphsonNov 8, 2007
  23. 4/5 Fix sed string regex escaping in module_name.Ralf Wildenhues, Nov 6, 2007
  24. 5/5 Avoid "test -o" and "test -a" which are not POSIX, only XSI.Ralf Wildenhues, Nov 6, 2007
  25. Junio C HamanoNov 6, 2007
  26. Mike HommeyNov 6, 2007
  27. Johannes SchindelinNov 6, 2007
  28. Mike RalphsonNov 7, 2007
  29. Johannes SchindelinNov 7, 2007
  30. Mike RalphsonNov 7, 2007
  31. Johannes SchindelinNov 7, 2007
  32. Ralf WildenhuesNov 6, 2007
  33. Nguyen Thai Ngoc DuyNov 7, 2007
  34. Nguyen Thai Ngoc DuyNov 7, 2007
  35. Junio C HamanoNov 7, 2007
  36. Ralf WildenhuesNov 8, 2007
  37. Nguyen Thai Ngoc DuyNov 12, 2007
  38. Miles BaderNov 10, 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.