From: "SZEDER Gábor" <szeder.dev@gmail•com>
To: Bert Wesarg <bert.wesarg@googlemail•com>
Cc: git@vger•kernel.org, Denton Liu <liu.denton@gmail•com>,
Junio C Hamano <gitster@pobox•com>
Subject: Re: [PATCH v4 1/2] format-patch: create leading components of output directory
Date: Fri, 11 Oct 2019 16:46:50 +0200 [thread overview]
Message-ID: <20191011144650.GM29845@szeder.dev> (raw)
In-Reply-To: <b172eba0b748c3f0f638786a5cfba905aca385cc.1570782773.git.bert.wesarg@googlemail.com>
On Fri, Oct 11, 2019 at 10:36:41AM +0200, Bert Wesarg wrote:
> Changes in v4:
> * based on dl/format-patch-doc-test-cleanup and adopt it
Thanks... but here I am nitpicking again, sorry :)
> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
> index 72b09896cf..9facc3a79e 100755
> --- a/t/t4014-format-patch.sh
> +++ b/t/t4014-format-patch.sh
> @@ -1606,6 +1606,29 @@ test_expect_success 'From line has expected format' '
> test_cmp from filtered
> '
>
> +test_expect_success 'format-patch -o with no leading directories' '
> + rm -fr patches &&
> + git format-patch -o patches master..side &&
> + count=$(git rev-list --count master..side) &&
> + ls patches >list &&
> + test_line_count = $count list
> +'
> +
> +test_expect_success 'format-patch -o with leading existing directories' '
> + git format-patch -o patches/side master..side &&
The previous test case creates the 'patches' directory and leaves it
behind, and this test implicitly relies on that directory to check
that 'format-patch -o' can deal with already existing directories. So
if the previous test case were to fail early or were not run at all
(e.g. './t4014-format-patch.sh -r 1,137'), then that directory
wouldn't exist, and, consequently, this test case would not check what
it was supposed to.
I think it would be better to be more explicit and self-contained
about it, and create a leading directory in this test case:
mkdir existing-dir &&
git format-patch -o existing-dir/side master..size &&
ls existing-dir/side >list &&
> + count=$(git rev-list --count master..side) &&
> + ls patches/side >list &&
> + test_line_count = $count list
> +'
> +
> +test_expect_success 'format-patch -o with leading non-existing directories' '
> + rm -fr patches &&
> + git format-patch -o patches/side master..side &&
> + count=$(git rev-list --count master..side) &&
> + ls patches/side >list &&
> + test_line_count = $count list
> +'
> +
> test_expect_success 'format-patch format.outputDirectory option' '
> test_config format.outputDirectory patches &&
> rm -fr patches &&
> --
> 2.23.0.13.g28bc381d7c
>
next prev parent reply other threads:[~2019-10-11 14:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <30278644805925935d05ae877c4b14843e37e40c.1570469582.git.bert.wesarg@googlemail.com>
2019-10-11 8:36 ` [PATCH v4 1/2] format-patch: create leading components of output directory Bert Wesarg
2019-10-11 8:36 ` [PATCH v4 2/2] format-patch: configure a command to generate the output directory name Bert Wesarg
2019-10-11 14:46 ` SZEDER Gábor [this message]
2019-10-11 15:45 ` [PATCH v4 1/2] format-patch: create leading components of output directory Bert Wesarg
2019-10-11 15:47 ` Bert Wesarg
2019-10-11 16:17 ` SZEDER Gábor
2019-10-21 10:25 ` [PATCH v5 " Bert Wesarg
2019-10-21 10:25 ` [PATCH v5 2/2] format-patch: configure a command to generate the output directory name Bert Wesarg
2019-10-21 13:20 ` [PATCH v5 1/2] format-patch: create leading components of output directory Bert Wesarg
2019-10-23 2:08 ` Junio C Hamano
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=20191011144650.GM29845@szeder.dev \
--to=szeder.dev@gmail$(echo .)com \
--cc=bert.wesarg@googlemail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=liu.denton@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox