From: Taylor Blau <me@ttaylorr.com>
To: Tamino Bauknecht <dev@tb6.eu>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] fetch: add new config option fetch.all
Date: Thu, 4 Jan 2024 14:13:19 -0500 [thread overview]
Message-ID: <ZZcDT3R0NavkyNYh@nand.local> (raw)
In-Reply-To: <88407aeb-bff7-4899-af7b-e7cb671d991a@tb6.eu>
On Thu, Jan 04, 2024 at 07:32:03PM +0100, Tamino Bauknecht wrote:
> > I don't feel particularly strongly about whether or not you reorganize
> > these if-statements, but we should change "argc == 0" to "!argc", which
> > matches the conventions of the rest of the project.
>
> Are you sure that I shouldn't use "argc == 0" here instead since it's also
> used in the next "else if" condition? Or is the goal to gradually transition
> to "!argc" in the entire code base?
> I agree with keeping the diff minimal, will change that to your suggestion.
See Documentation/CodingGuidelines.txt for more information about the
Git project's style guidelines, but in short: yes, any x == 0 should be
replaced with !x instead within if-statements.
> > This should be `cat >expect <<-\EOF` (without the space between the
> > redirect and heredoc, as well as indicating that the heredoc does not
> > need any shell expansions).
>
> Will do so, thanks.
> I tried to match the existing test cases as closely as possible, but if they
> are outdated, it might be better to use the more recent structure.
Junio notes in the thread further up that it is OK to imitate the
existing style of tests. I don't disagree, but I personally think it's
OK to introduce new tests in a better style without touching the
existing ones in the same patch (or requiring a preparatory patch to the
same effect).
> > It looks like these tests match the existing style of the test suite,
> > but they are somewhat out of date with respect to our more modern
> > standards. I would probably write this like:
> >
> > test_expect_success 'git fetch --all (works with fetch.all = true)' '
> > git clone one test10 &&
> > test_config -C test10 fetch.all true &&
> > for r in one two three
> > do
> > git -C test10 remote add $r ../$r || return 1
> > done &&
> > git -C test10 fetch --all &&
> > git -C test10 branch -r >actual &&
> > test_cmp expect actual
> > '
>
> I think I'd prefer having the "actual" (and maybe also "expected") output in
> the repository so that it won't be overwritten by the next test case.
Very reasonable.
> Thanks for the great review, will send an updated patch later.
Thanks for working on this!
Thanks,
Taylor
next prev parent reply other threads:[~2024-01-04 19:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 20:15 new config option "fetch.all" Tamino Bauknecht
2024-01-04 14:33 ` [PATCH] fetch: add new config option fetch.all Tamino Bauknecht
2024-01-04 17:33 ` Taylor Blau
2024-01-04 18:04 ` Eric Sunshine
2024-01-04 18:29 ` Junio C Hamano
2024-01-04 18:32 ` Tamino Bauknecht
2024-01-04 19:13 ` Taylor Blau [this message]
2024-01-04 18:23 ` Junio C Hamano
2024-01-04 20:18 ` Tamino Bauknecht
2024-01-04 20:49 ` Junio C Hamano
2024-01-04 20:25 ` Tamino Bauknecht
2024-01-04 20:50 ` Eric Sunshine
2024-01-04 20:55 ` Eric Sunshine
2024-01-04 22:22 ` [PATCH v2 1/2] " Tamino Bauknecht
2024-01-04 22:22 ` [PATCH v2 2/2] fetch: add cli option --default-only Tamino Bauknecht
2024-01-05 2:43 ` Eric Sunshine
2024-01-05 16:13 ` Junio C Hamano
2024-01-06 20:17 ` [PATCH v3] fetch: add new config option fetch.all Tamino Bauknecht
2024-01-06 23:32 ` Eric Sunshine
2024-01-06 23:37 ` Eric Sunshine
2024-01-08 17:25 ` Junio C Hamano
2024-01-08 21:13 ` [PATCH] " Tamino Bauknecht
2024-01-05 1:02 ` [PATCH v2 1/2] " Eric Sunshine
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=ZZcDT3R0NavkyNYh@nand.local \
--to=me@ttaylorr.com \
--cc=dev@tb6.eu \
--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.
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).