Skip to content

Commit 0f063b6

Browse files
mtelkagitster
authored andcommitted
Switch grep from non-portable BRE to portable ERE
This makes the grep usage fully POSIX compliant. The ability to enable ERE features in BRE using backslash is a GNU extension. Signed-off-by: Marcel Telka <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d8ab1d4 commit 0f063b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mergetools/vimdiff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ gen_cmd () {
325325
fi
326326

327327
# If this is a single window diff with all the buffers
328-
if ! echo "$tab" | grep ",\|/" >/dev/null
328+
if ! echo "$tab" | grep -E ",|/" >/dev/null
329329
then
330330
CMD="$CMD | silent execute 'bufdo diffthis'"
331331
fi

t/t1404-update-ref-errors.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ df_test() {
100100
printf "%s\n" "delete $delname" "create $addname $D"
101101
fi >commands &&
102102
test_must_fail git update-ref --stdin <commands 2>output.err &&
103-
grep "fatal:\( cannot lock ref $SQ$addname$SQ:\)\? $SQ$delref$SQ exists; cannot create $SQ$addref$SQ" output.err &&
103+
grep -E "fatal:( cannot lock ref $SQ$addname$SQ:)? $SQ$delref$SQ exists; cannot create $SQ$addref$SQ" output.err &&
104104
printf "%s\n" "$C $delref" >expected-refs &&
105105
git for-each-ref --format="%(objectname) %(refname)" $prefix/r >actual-refs &&
106106
test_cmp expected-refs actual-refs

0 commit comments

Comments
 (0)