t: remove \{m,n\} from BRE grep usage
The CodingGuidelines says we should avoid \{m,n\} in BRE usage. And their usages in our code base is limited, and subjectively hard to read. Replace them with ERE. Except for "0\{40\}" which would be changed to "$ZERO_OID", which is a better value for testing with: GIT_TEST_DEFAULT_HASH=sha256 Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
2e092725e6
commit
a764c37bad
@ -9,7 +9,7 @@ path_has_fanout() {
|
||||
path=$1 &&
|
||||
fanout=$2 &&
|
||||
after_last_slash=$(($(test_oid hexsz) - $fanout * 2)) &&
|
||||
echo $path | grep -q "^\([0-9a-f]\{2\}/\)\{$fanout\}[0-9a-f]\{$after_last_slash\}$"
|
||||
echo $path | grep -q -E "^([0-9a-f]{2}/){$fanout}[0-9a-f]{$after_last_slash}$"
|
||||
}
|
||||
|
||||
touched_one_note_with_fanout() {
|
||||
|
Reference in New Issue
Block a user