summaryrefslogtreecommitdiff
path: root/t/t5411/test-0040-process-all-refs.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-0040-process-all-refs.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-0040-process-all-refs.sh')
-rw-r--r--t/t5411/test-0040-process-all-refs.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t5411/test-0040-process-all-refs.sh b/t/t5411/test-0040-process-all-refs.sh
index f67cb2a7b3..2f405adefa 100644
--- a/t/t5411/test-0040-process-all-refs.sh
+++ b/t/t5411/test-0040-process-all-refs.sh
@@ -85,11 +85,11 @@ test_expect_success "proc-receive: process all refs ($PROTOCOL)" '
> remote: post-receive< <COMMIT-A> <COMMIT-B> refs/pull/123/head Z
> remote: post-receive< <COMMIT-B> <COMMIT-A> refs/pull/124/head Z
> To <URL/of/upstream.git>
- > <OID-A>..<OID-B> <COMMIT-B> -> bar
+ > <COMMIT-A>..<COMMIT-B> <COMMIT-B> -> bar
> - [deleted] foo
- > + <OID-B>...<OID-A> HEAD -> main (forced update)
- > <OID-A>..<OID-B> HEAD -> refs/pull/123/head
- > + <OID-B>...<OID-A> HEAD -> refs/pull/124/head (forced update)
+ > + <COMMIT-B>...<COMMIT-A> HEAD -> main (forced update)
+ > <COMMIT-A>..<COMMIT-B> HEAD -> refs/pull/123/head
+ > + <COMMIT-B>...<COMMIT-A> HEAD -> refs/pull/124/head (forced update)
EOF
test_cmp expect actual &&