aboutsummaryrefslogtreecommitdiffhomepage
path: root/git-remote-gcrypt
diff options
context:
space:
mode:
authorroot <root@localhost>2013-02-14 00:00:00 +0000
committerroot <root@localhost>2013-02-14 00:00:00 +0000
commitd342bbceabea7225a2922ce49c2ab47f36a4f74f (patch)
tree810211ff74644930b902c17c8f9b12e39c8d2d97 /git-remote-gcrypt
parent7eb9620b7af41cc25729afee419262c40a8c5a2b (diff)
downloadgit-remote-gcrypt-d342bbceabea7225a2922ce49c2ab47f36a4f74f.tar.gz
Fix quoting of '$' for grep
Diffstat (limited to 'git-remote-gcrypt')
-rwxr-xr-xgit-remote-gcrypt4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-remote-gcrypt b/git-remote-gcrypt
index 2a47b67..32071fd 100755
--- a/git-remote-gcrypt
+++ b/git-remote-gcrypt
@@ -36,7 +36,7 @@ gitception_get()
[ -e "$FHEAD" ] && command mv -f "$FHEAD" "$FHEAD.$$~" || :
git fetch -q -f "$1" HEAD:"$GREF" 2>/dev/tty >/dev/null &&
OBJID="$(git ls-tree "$GREF" |
- xgrep -E "\b$2$" | awk '{print $3}')" &&
+ xgrep -E '\b'"$2"'$' | awk '{print $3}')" &&
[ -n "$OBJID" ] && git cat-file blob "$OBJID" && RETVAL=: ||
{ RETVAL=false && : ; }
[ -e "$FHEAD.$$~" ] && command mv -f "$FHEAD.$$~" "$FHEAD" || :
@@ -56,7 +56,7 @@ anon_commit()
update_tree()
{
# $2 is a filename from the repo format
- (git ls-tree "$1" | xgrep -v -E "\b$2$";
+ (git ls-tree "$1" | xgrep -v -E '\b'"$2"'$';
printf "100644 blob %s\t%s" "$3" "$2") | git mktree
}