mirror of
https://github.com/git/git
synced 2024-11-04 16:17:49 +00:00
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 <marcel@telka.sk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
d8ab1d464d
commit
0f063b6c76
2 changed files with 2 additions and 2 deletions
|
@ -325,7 +325,7 @@ gen_cmd () {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If this is a single window diff with all the buffers
|
# If this is a single window diff with all the buffers
|
||||||
if ! echo "$tab" | grep ",\|/" >/dev/null
|
if ! echo "$tab" | grep -E ",|/" >/dev/null
|
||||||
then
|
then
|
||||||
CMD="$CMD | silent execute 'bufdo diffthis'"
|
CMD="$CMD | silent execute 'bufdo diffthis'"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -100,7 +100,7 @@ df_test() {
|
||||||
printf "%s\n" "delete $delname" "create $addname $D"
|
printf "%s\n" "delete $delname" "create $addname $D"
|
||||||
fi >commands &&
|
fi >commands &&
|
||||||
test_must_fail git update-ref --stdin <commands 2>output.err &&
|
test_must_fail git update-ref --stdin <commands 2>output.err &&
|
||||||
grep "fatal:\( cannot lock ref $SQ$addname$SQ:\)\? $SQ$delref$SQ exists; cannot create $SQ$addref$SQ" output.err &&
|
grep -E "fatal:( cannot lock ref $SQ$addname$SQ:)? $SQ$delref$SQ exists; cannot create $SQ$addref$SQ" output.err &&
|
||||||
printf "%s\n" "$C $delref" >expected-refs &&
|
printf "%s\n" "$C $delref" >expected-refs &&
|
||||||
git for-each-ref --format="%(objectname) %(refname)" $prefix/r >actual-refs &&
|
git for-each-ref --format="%(objectname) %(refname)" $prefix/r >actual-refs &&
|
||||||
test_cmp expected-refs actual-refs
|
test_cmp expected-refs actual-refs
|
||||||
|
|
Loading…
Reference in a new issue