File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -201,8 +201,8 @@ test_expect_success 'git branch -M baz bam should succeed when baz is checked ou
201
201
202
202
test_expect_success ' git branch -M baz bam should add entries to .git/logs/HEAD' '
203
203
msg="Branch: renamed refs/heads/baz to refs/heads/bam" &&
204
- grep " 0\{40\} .*$msg$" .git/logs/HEAD &&
205
- grep "^0\{40\} .*$msg$" .git/logs/HEAD
204
+ grep " $ZERO_OID .*$msg$" .git/logs/HEAD &&
205
+ grep "^$ZERO_OID .*$msg$" .git/logs/HEAD
206
206
'
207
207
208
208
test_expect_success ' git branch -M should leave orphaned HEAD alone' '
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ path_has_fanout() {
9
9
path=$1 &&
10
10
fanout=$2 &&
11
11
after_last_slash=$(( $(test_oid hexsz) - $fanout * 2 )) &&
12
- echo $path | grep -q " ^\ ([0-9a-f]\{2\}/\)\ {$fanout \ }[0-9a-f]\ {$after_last_slash \ }$"
12
+ echo $path | grep -q -E " ^ ([0-9a-f]{2}/) {$fanout }[0-9a-f]{$after_last_slash }$"
13
13
}
14
14
15
15
touched_one_note_with_fanout () {
Original file line number Diff line number Diff line change @@ -1244,9 +1244,9 @@ test_expect_success 'short commit ID collide' '
1244
1244
test $colliding_id = "$(git rev-parse HEAD | cut -c 1-4)" &&
1245
1245
grep "^pick $colliding_id " \
1246
1246
.git/rebase-merge/git-rebase-todo.tmp &&
1247
- grep "^pick [0-9a-f]\ {$hexsz\ }" \
1247
+ grep -E "^pick [0-9a-f]{$hexsz}" \
1248
1248
.git/rebase-merge/git-rebase-todo &&
1249
- grep "^pick [0-9a-f]\ {$hexsz\ }" \
1249
+ grep -E "^pick [0-9a-f]{$hexsz}" \
1250
1250
.git/rebase-merge/git-rebase-todo.backup &&
1251
1251
git rebase --continue
1252
1252
) &&
@@ -1261,7 +1261,7 @@ test_expect_success 'respect core.abbrev' '
1261
1261
set_cat_todo_editor &&
1262
1262
test_must_fail git rebase -i HEAD~4 >todo-list
1263
1263
) &&
1264
- test 4 = $(grep -c "pick [0-9a-f]\ {12,\ }" todo-list)
1264
+ test 4 = $(grep -c -E "pick [0-9a-f]{12,}" todo-list)
1265
1265
'
1266
1266
1267
1267
test_expect_success ' todo count' '
Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ test_expect_success 'http-fetch --packfile' '
234
234
--index-pack-arg=--keep \
235
235
"$HTTPD_URL"/dumb/repo_pack.git/$p >out &&
236
236
237
- grep "^keep.[0-9a-f]\ {16,\ }$" out &&
237
+ grep -E "^keep.[0-9a-f]{16,}$" out &&
238
238
cut -c6- out >packhash &&
239
239
240
240
# Ensure that the expected files are generated
Original file line number Diff line number Diff line change @@ -1001,7 +1001,7 @@ test_expect_success 'part of packfile response provided as URI' '
1001
1001
do
1002
1002
git verify-pack --object-format=$(test_oid algo) --verbose $idx >out &&
1003
1003
{
1004
- grep "^[0-9a-f]\ {16,\ } " out || :
1004
+ grep -E "^[0-9a-f]{16,} " out || :
1005
1005
} >out.objectlist &&
1006
1006
if test_line_count = 1 out.objectlist
1007
1007
then
You can’t perform that action at this time.
0 commit comments