summaryrefslogtreecommitdiff
path: root/t/t5411/common-functions.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-25 23:24:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-25 23:24:52 (GMT)
commit8f8f10ac09fff0d15b74f8bded18a81d24f0127d (patch)
tree119ac744c0e9ecccb06a18802b40eb52ac43efa0 /t/t5411/common-functions.sh
parent455e8d18f81583d0270685edc6ec2ed201fc984c (diff)
parent80ffeb94f4c9eae4e099fec47e39105fc1e19132 (diff)
downloadgit-8f8f10ac09fff0d15b74f8bded18a81d24f0127d.zip
git-8f8f10ac09fff0d15b74f8bded18a81d24f0127d.tar.gz
git-8f8f10ac09fff0d15b74f8bded18a81d24f0127d.tar.bz2
Merge branch 'jx/t5411-flake-fix'
The exchange between receive-pack and proc-receive hook did not carefully check for errors. * jx/t5411-flake-fix: receive-pack: use default version 0 for proc-receive receive-pack: gently write messages to proc-receive t5411: new helper filter_out_user_friendly_and_stable_output
Diffstat (limited to 't/t5411/common-functions.sh')
-rw-r--r--t/t5411/common-functions.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t5411/common-functions.sh b/t/t5411/common-functions.sh
index 521a347..344d13f 100644
--- a/t/t5411/common-functions.sh
+++ b/t/t5411/common-functions.sh
@@ -42,7 +42,7 @@ create_commits_in () {
make_user_friendly_and_stable_output () {
sed \
-e "s/ *\$//" \
- -e "s/ */ /g" \
+ -e "s/ */ /g" \
-e "s/'/\"/g" \
-e "s/ / /g" \
-e "s/$A/<COMMIT-A>/g" \
@@ -54,3 +54,8 @@ make_user_friendly_and_stable_output () {
-e "s#To $URL_PREFIX/upstream.git#To <URL/of/upstream.git>#" \
-e "/^error: / d"
}
+
+filter_out_user_friendly_and_stable_output () {
+ make_user_friendly_and_stable_output |
+ sed -n ${1+"$@"}
+}