From: "Torsten Bögershausen" <tboegi@web.de>
To: git@vger.kernel.org
Cc: tboegi@web.de
Subject: [PATCH] t5541: Improve push test
Date: Mon, 9 Dec 2013 21:03:28 +0100 [thread overview]
Message-ID: <201312092103.29047.tboegi@web.de> (raw)
The old log-line looked like this:
+ 9d498b0...8598732 master -> master (forced update)
And the new one like this:
9d498b0..8598732 master -> master
- Loosen the grep pattern by not demanding "(forced update)"
- Improve the grep pattern and check the new SHA id
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
The following revealed a weakness in t5541:
commit f9e3c6bebb89de12f2dfdaa1899cb22e9ef32542
Author: Felipe Contreras <felipe.contreras@gmail.com>
Date: Tue Nov 12 14:56:57 2013 -0600
transport-helper: check for 'forced update' message
So don't look for forced update, but check for the SHA.
(I want to fix a missing "&&" as well, that is for the next commit)
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index 470ac54..1468a07 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -168,7 +168,8 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he
test_must_fail git push -v origin +master master:retsam >output 2>&1'
test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper: remote output' '
- grep "^ + [a-f0-9]*\.\.\.[a-f0-9]* *master -> master (forced update)$" output &&
+ newsha=$(git log --oneline -n1 | sed -e "s/^\([0-9a-f]*\).*/\1/") &&
+ grep "\.\.$newsha *master -> master" output &&
grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output
'
--
1.8.5
next reply other threads:[~2013-12-09 20:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 20:03 Torsten Bögershausen [this message]
2013-12-09 22:10 ` [PATCH] t5541: Improve push test Junio C Hamano
2013-12-11 15:13 ` Torsten Bögershausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201312092103.29047.tboegi@web.de \
--to=tboegi@web.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.