Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorĐoàn Trần Công Danh <congdanhqx@gmail.com>2022-09-21 16:02:30 +0300
committerJunio C Hamano <gitster@pobox.com>2022-09-21 21:00:18 +0300
commita764c37bad6b4da2b248c30af1c251110fe1e031 (patch)
treebc1a7f42558e8f676e731094adb179e9f27f8c5e /t/t3200-branch.sh
parent2e092725e6f73d20080c3a71c0d8e234f266cb8d (diff)
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>
Diffstat (limited to 't/t3200-branch.sh')
-rwxr-xr-xt/t3200-branch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 9723c2827c..b82cffc0b3 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -201,8 +201,8 @@ test_expect_success 'git branch -M baz bam should succeed when baz is checked ou
test_expect_success 'git branch -M baz bam should add entries to .git/logs/HEAD' '
msg="Branch: renamed refs/heads/baz to refs/heads/bam" &&
- grep " 0\{40\}.*$msg$" .git/logs/HEAD &&
- grep "^0\{40\}.*$msg$" .git/logs/HEAD
+ grep " $ZERO_OID.*$msg$" .git/logs/HEAD &&
+ grep "^$ZERO_OID.*$msg$" .git/logs/HEAD
'
test_expect_success 'git branch -M should leave orphaned HEAD alone' '