summaryrefslogtreecommitdiff
path: root/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh
diff options
context:
space:
mode:
authorLibravatar Jiang Xin <worldhello.net@gmail.com>2021-06-17 11:17:27 +0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-06-17 14:12:24 +0900
commit12d6991cf417465d567c38ba8ae7d59bda7a202f (patch)
tree9474d49f346d2db497f1bc2b95dacaf61b69128a /t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh
parenttest: refactor to use "test_commit" to create commits (diff)
downloadtgif-12d6991cf417465d567c38ba8ae7d59bda7a202f.tar.xz
test: refactor to use "get_abbrev_oid" to get abbrev oid
Add new function "get_abbrev_oid" to get abbrev object ID. This function has a default value which helps to prepare a nonempty replace pattern for sed command. An empty replace pattern may cause sed fail to allocate memory. Refactor function "make_user_friendly_and_stable_output" to use "get_abbrev_oid" to get abbrev object ID. Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh')
-rw-r--r--t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh b/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh
index 7786079ba5..bc44810f33 100644
--- a/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh
+++ b/t/t5411/test-0037-report-multi-rewrite-for-one-ref--porcelain.sh
@@ -45,9 +45,9 @@ test_expect_success "proc-receive: multiple rewrite for one ref, no refname for
> remote: post-receive< <ZERO-OID> <COMMIT-A> refs/changes/24/124/1 Z
> remote: post-receive< <COMMIT-A> <COMMIT-B> refs/changes/25/125/1 Z
> To <URL/of/upstream.git>
- > HEAD:refs/for/main/topic <OID-A>..<OID-B>
+ > HEAD:refs/for/main/topic <COMMIT-A>..<COMMIT-B>
> * HEAD:refs/changes/24/124/1 [new reference]
- > HEAD:refs/changes/25/125/1 <OID-A>..<OID-B>
+ > HEAD:refs/changes/25/125/1 <COMMIT-A>..<COMMIT-B>
> Done
EOF
test_cmp expect actual &&
@@ -107,8 +107,8 @@ test_expect_success "proc-receive: multiple rewrites for one ref, no refname for
> remote: post-receive< <COMMIT-B> <COMMIT-A> refs/changes/25/125/1 Z
> To <URL/of/upstream.git>
> * HEAD:refs/changes/24/124/1 [new reference]
- > HEAD:refs/for/main/topic <OID-A>..<OID-B>
- > + HEAD:refs/changes/25/125/1 <OID-B>...<OID-A> (forced update)
+ > HEAD:refs/for/main/topic <COMMIT-A>..<COMMIT-B>
+ > + HEAD:refs/changes/25/125/1 <COMMIT-B>...<COMMIT-A> (forced update)
> Done
EOF
test_cmp expect actual &&
@@ -155,7 +155,7 @@ test_expect_success "proc-receive: multiple rewrites for one ref ($PROTOCOL/porc
> remote: post-receive< <COMMIT-A> <COMMIT-B> refs/changes/24/124/2 Z
> To <URL/of/upstream.git>
> * HEAD:refs/changes/23/123/1 [new reference]
- > HEAD:refs/changes/24/124/2 <OID-A>..<OID-B>
+ > HEAD:refs/changes/24/124/2 <COMMIT-A>..<COMMIT-B>
> Done
EOF
test_cmp expect actual &&