From 50efd29ce94c4dd90421db29d2516fdde675f8e8 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 23 Apr 2008 21:14:08 +0200 Subject: [PATCH] Drop use of $(...) for popen() and system() calls Some shells don't support it, like the jsh that is used as /bin/sh on some Solaris boxes, which results in the following error: sh: syntax error at line 1: `(' unexpected Fix the only user (reading remote information via git-ls-remote) to use a much simpler shell syntax. Reported by SungHyun Nam. --- NEWS | 2 ++ tig.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 72efd04..626c824 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,8 @@ Bug fixes: - Fix regression when staging all diff chunks in a section. - Bind the maximize view action to 'O'; it conflicted with the keybinding to launch the merge tool in the status view. + - Fix problem with $(cmd) usage in shell code. Some shells (jsh) + installed as /bin/sh does not support it. tig-0.11 -------- diff --git a/tig.c b/tig.c index 67d0693..c50ea84 100644 --- a/tig.c +++ b/tig.c @@ -109,7 +109,7 @@ static size_t utf8_length(const char *string, int *width, size_t max_width, int #endif #define TIG_LS_REMOTE \ - "git ls-remote $(git rev-parse --git-dir) 2>/dev/null" + "git ls-remote . 2>/dev/null" #define TIG_DIFF_CMD \ "git show --pretty=fuller --no-color --root --patch-with-stat --find-copies-harder -C %s 2>/dev/null" -- 2.32.0.93.g670b81a890