File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 107107 excludes = [
108108 # We haven't linted these files yet
109109 ''^tests/functional/dump-db\.sh$''
110- ''^tests/functional/fetchGitRefs\.sh$''
111110 ''^tests/functional/fetchGitSubmodules\.sh$''
112111 ''^tests/functional/fetchGitVerification\.sh$''
113112 ''^tests/functional/fetchMercurial\.sh$''
Original file line number Diff line number Diff line change @@ -38,16 +38,16 @@ path=$(nix eval --raw --impure --expr "(builtins.fetchGit { url = $repo; ref = \
3838# 10. They cannot contain a \.
3939
4040valid_ref () {
41- { set +x; printf >&2 ' \n>>>>>>>>>> valid_ref %s\b <<<<<<<<<<\n' $( printf %s " $1 " | sed -n -e l) ; set -x; }
41+ { set +x; printf >&2 ' \n>>>>>>>>>> valid_ref %s\b <<<<<<<<<<\n' " $( printf %s " $1 " | sed -n -e l) " ; set -x; }
4242 git check-ref-format --branch " $1 " > /dev/null
4343 git -C " $repo " branch " $1 " master > /dev/null
4444 path1=$( nix eval --raw --impure --expr " (builtins.fetchGit { url = $repo ; ref = ''$1 ''; }).outPath" )
45- [[ $path1 = $path ]]
45+ [[ $path1 = " $path " ]]
4646 git -C " $repo " branch -D " $1 " > /dev/null
4747}
4848
4949invalid_ref () {
50- { set +x; printf >&2 ' \n>>>>>>>>>> invalid_ref %s\b <<<<<<<<<<\n' $( printf %s " $1 " | sed -n -e l) ; set -x; }
50+ { set +x; printf >&2 ' \n>>>>>>>>>> invalid_ref %s\b <<<<<<<<<<\n' " $( printf %s " $1 " | sed -n -e l) " ; set -x; }
5151 # special case for a sole @:
5252 # --branch @ will try to interpret @ as a branch reference and not fail. Thus we need --allow-onelevel
5353 if [ " $1 " = " @" ]; then
@@ -68,6 +68,7 @@ valid_ref 'heads/foo@bar'
6868valid_ref " $( printf ' heads/fu\303\237' ) "
6969valid_ref ' foo-bar-baz'
7070valid_ref ' branch#'
71+ # shellcheck disable=SC2016
7172valid_ref ' $1'
7273valid_ref ' foo.locke'
7374
You can’t perform that action at this time.
0 commit comments