mirror of
https://github.com/git/git.git
synced 2024-09-08 03:50:44 +02: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
@ -325,7 +325,7 @@ gen_cmd () {
|
||||
fi
|
||||
|
||||
# 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
|
||||
CMD="$CMD | silent execute 'bufdo diffthis'"
|
||||
fi
|
||||
|
@ -100,7 +100,7 @@ df_test() {
|
||||
printf "%s\n" "delete $delname" "create $addname $D"
|
||||
fi >commands &&
|
||||
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 &&
|
||||
git for-each-ref --format="%(objectname) %(refname)" $prefix/r >actual-refs &&
|
||||
test_cmp expected-refs actual-refs
|
||||
|
Loading…
Reference in New Issue
Block a user