Commit 50efd29ce94c4dd90421db29d2516fdde675f8e8
- Date: Wed Apr 23 21:52:09 +0000 2008
- Committer: Jonas Fonseca (fonseca@diku.dk)
- Author: Jonas Fonseca (fonseca@diku.dk)
- Commit SHA1: 50efd29ce94c4dd90421db29d2516fdde675f8e8
- Tree SHA1: fdfe932d3527a34b9cf1f1c76fc1969aab729536
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.
Commit diff
| |   |
| 15 | 15 | - Fix regression when staging all diff chunks in a section. |
| 16 | 16 | - Bind the maximize view action to 'O'; it conflicted with the |
| 17 | 17 | keybinding to launch the merge tool in the status view. |
| 18 | - Fix problem with $(cmd) usage in shell code. Some shells (jsh) |
| 19 | installed as /bin/sh does not support it. |
| 18 | 20 | |
| 19 | 21 | tig-0.11 |
| 20 | 22 | -------- |
| toggle raw diff |
--- 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
-------- |
| |   |
| 109 | 109 | #endif |
| 110 | 110 | |
| 111 | 111 | #define TIG_LS_REMOTE \ |
| 112 | | "git ls-remote $(git rev-parse --git-dir) 2>/dev/null" |
| 112 | "git ls-remote . 2>/dev/null" |
| 113 | 113 | |
| 114 | 114 | #define TIG_DIFF_CMD \ |
| 115 | 115 | "git show --pretty=fuller --no-color --root --patch-with-stat --find-copies-harder -C %s 2>/dev/null" |
| toggle raw diff |
--- 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" |