From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, "SZEDER Gábor" <szeder.dev@gmail.com>
Subject: [PATCH 3/4] t3200: restore branch after "unborn --edit-description" test
Date: Mon, 1 Jan 2018 23:54:47 +0100 [thread overview]
Message-ID: <20180101225448.2561-4-szeder.dev@gmail.com> (raw)
In-Reply-To: <20180101225448.2561-1-szeder.dev@gmail.com>
The test 'refuse --edit-description on unborn branch for now' switches
to an orphan branch and leaves the test repository in that state.
This might badly influence the subsequent test expecting 'git branch
--merged' to error out, by hiding a potential regression with an error
triggered by the unborn branch. Furthermore, a new test that will be
added later in this series failed first because of this.
Use test_when_finished to switch back to the master branch at the end
of the test in question.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
t/t3200-branch.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index e9f55ac04..427ad490d 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -1234,6 +1234,7 @@ test_expect_success 'refuse --edit-description on unborn branch for now' '
write_script editor <<-\EOF &&
echo "New contents" >"$1"
EOF
+ test_when_finished git checkout master &&
git checkout --orphan unborn &&
test_must_fail env EDITOR=./editor git branch --edit-description
'
--
2.16.0.rc0.67.g3a46dbca7
next prev parent reply other threads:[~2018-01-01 22:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-01 22:54 [PATCH 0/4] branch: add '--show-description' option SZEDER Gábor
2018-01-01 22:54 ` [PATCH 1/4] branch: '--edit-description' is incompatible with other options SZEDER Gábor
2018-01-01 22:54 ` [PATCH 2/4] t3200: fix a misindented line SZEDER Gábor
2018-01-01 22:54 ` SZEDER Gábor [this message]
2018-01-01 22:54 ` [PATCH 4/4] branch: add '--show-description' option SZEDER Gábor
2018-01-02 5:17 ` Eric Sunshine
2018-01-02 10:39 ` SZEDER Gábor
2018-01-02 9:32 ` Johannes Sixt
2018-01-02 10:41 ` SZEDER Gábor
2018-01-02 19:25 ` SZEDER Gábor
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180101225448.2561-4-szeder.dev@gmail.com \
--to=szeder.dev@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).