git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Bert Wesarg <bert.wesarg@googlemail.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Git Mailing List <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 17:47:44 +0200	[thread overview]
Message-ID: <CAKPyHN22-SnZ2_o1MO6EXuWk7S2AAWGQSjxu0OrhDq4pw=ap=g@mail.gmail.com> (raw)
In-Reply-To: <CAKPyHN0s8Rc8Sbp7ubyJ5cTDC5oh4Re+wqyTUWUo+3HgpKfECg@mail.gmail.com>

On Fri, Oct 11, 2019 at 5:45 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
>
> On Fri, Oct 11, 2019 at 4:46 PM SZEDER Gábor <szeder.dev@gmail.com> wrote:
> >
> > 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 &&

one question: How about removing this directory first, just to be
sure, that mkdir does create a directory?

Bert

> >
>
> thanks. Your nitpicking is always appreciated.
>
> Bert
>
> > > +     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
> > >

  reply	other threads:[~2019-10-11 15:47 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   ` [PATCH v4 1/2] format-patch: create leading components of output directory SZEDER Gábor
2019-10-11 15:45     ` Bert Wesarg
2019-10-11 15:47       ` Bert Wesarg [this message]
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

  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='CAKPyHN22-SnZ2_o1MO6EXuWk7S2AAWGQSjxu0OrhDq4pw=ap=g@mail.gmail.com' \
    --to=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liu.denton@gmail.com \
    --cc=szeder.dev@gmail.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).