Skip to content

Commit 079323d

Browse files
committed
Merge branch 'bc/zsh-compatibility' into maint-2.45
zsh can pretend to be a normal shell pretty well except for some glitches that we tickle in some of our scripts. Work them around so that "vimdiff" and our test suite works well enough with it. * bc/zsh-compatibility: vimdiff: make script and tests work with zsh t4046: avoid continue in &&-chain for zsh
2 parents 1b1b4d4 + fedd5c7 commit 079323d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

mergetools/vimdiff

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ gen_cmd_aux () {
7272
nested=0
7373
nested_min=100
7474

75-
7675
# Step 1:
7776
#
7877
# Increase/decrease "start"/"end" indices respectively to get rid of
@@ -87,7 +86,7 @@ gen_cmd_aux () {
8786
IFS=#
8887
for c in $(echo "$LAYOUT" | sed 's:.:&#:g')
8988
do
90-
if test "$c" = " "
89+
if test -z "$c" || test "$c" = " "
9190
then
9291
continue
9392
fi

t/t4046-diff-unmerged.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ test_expect_success setup '
2020
for t in o x
2121
do
2222
path="$b$o$t" &&
23-
case "$path" in ooo) continue ;; esac &&
24-
paths="$paths$path " &&
25-
p=" $path" &&
26-
case "$b" in x) echo "$m1$p" ;; esac &&
27-
case "$o" in x) echo "$m2$p" ;; esac &&
28-
case "$t" in x) echo "$m3$p" ;; esac ||
29-
return 1
23+
if test "$path" != ooo
24+
then
25+
paths="$paths$path " &&
26+
p=" $path" &&
27+
case "$b" in x) echo "$m1$p" ;; esac &&
28+
case "$o" in x) echo "$m2$p" ;; esac &&
29+
case "$t" in x) echo "$m3$p" ;; esac ||
30+
return 1
31+
fi
3032
done
3133
done
3234
done >ls-files-s.expect &&

0 commit comments

Comments
 (0)