diff options
author | Thomas Rast <trast@student.ethz.ch> | 2011-12-21 16:54:14 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-21 11:33:11 -0800 |
commit | 6f2dd720b68ee8df0afae92e96001c8d3f14c1dc (patch) | |
tree | 747e003d88f6ea83cb235efe49f102dbc73d1b85 /t/t9137-git-svn-dcommit-clobber-series.sh | |
parent | Merge branch 'maint' (diff) | |
download | tgif-6f2dd720b68ee8df0afae92e96001c8d3f14c1dc.tar.xz |
bash completion: use read -r everywhere
We use the 'read' command without -r, so that it treats '\' as an
escape character, in several places. This breaks the loop reading
refnames from git-for-each-ref in __git_refs() if there are refnames
such as "foo'bar", in which case for-each-ref helpfully quotes them as
$ git update-ref "refs/remotes/test/foo'bar" HEAD
$ git for-each-ref --shell --format="ref=%(refname:short)" "refs/remotes"
ref='test/foo'\''bar'
Interpolating the \' here will read "ref='test/foo'''bar'" instead, and
eval then chokes on the unbalanced quotes.
However, since none of the read loops _want_ to have backslashes
interpolated, it's much safer to use read -r everywhere.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9137-git-svn-dcommit-clobber-series.sh')
0 files changed, 0 insertions, 0 deletions