diff options
author | Joey Hess <joey@kitenet.net> | 2014-05-19 18:20:51 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-05-19 18:20:51 -0400 |
commit | 0ce768c4ddc4f28d18f0b00dd6798f19fd1f7f8e (patch) | |
tree | 87f1c1d5fd29d7cff5c992e799db1227b6125acd | |
parent | 8b619df24a503fae088174824e9041d54caf011d (diff) | |
download | git-remote-gcrypt-0ce768c4ddc4f28d18f0b00dd6798f19fd1f7f8e.zip git-remote-gcrypt-0ce768c4ddc4f28d18f0b00dd6798f19fd1f7f8e.tar.gz git-remote-gcrypt-0ce768c4ddc4f28d18f0b00dd6798f19fd1f7f8e.tar.bz2 |
fix on OSX
set -e causes the xecho to not run if the xgrep fails. At least with OSX's
/bin/sh, which is:
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
This didn't happen on Linux with:
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
Possibly a bug in bash, or an OSX-specific bug. However, disabling set -e
in the subshell seems a good idea anyway.
fixes https://github.com/blake2-ppc/git-remote-gcrypt/issues/15
-rwxr-xr-x | git-remote-gcrypt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git-remote-gcrypt b/git-remote-gcrypt index 8c1efa6..2295111 100755 --- a/git-remote-gcrypt +++ b/git-remote-gcrypt @@ -176,8 +176,10 @@ update_tree() { local tab_=" " # $2 is a filename from the repo format - (git ls-tree "$1" | xgrep -v -E '\b'"$2"'$'; - xecho "100644 blob $3$tab_$2") | git mktree + (set +e; + git ls-tree "$1" | xgrep -v -E '\b'"$2"'$'; + xecho "100644 blob $3$tab_$2" + ) | git mktree } # Put giturl $1, file $2 |