git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4 4/4] t0302: test credential-store support for XDG_CONFIG_HOME

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 18, 2015, 21:15 UTC
Message-ID
<CAPig+cTaQAnWoz7=v9tOPZoeE3LTV+H6KD_tAzmOXi3Tjay_WA@mail.gmail.com>
In-Reply-To
<vpq3852dzry.fsf@anie.imag.fr>

On Wed, Mar 18, 2015 at 12:41 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:

> Similarly to the "merge doc and code", I personally prefer seeing code
> and tests in the same patch.

In this case, the patch introducing the tests is already quite long and intricate, almost to the point of being a burden to review. Combining the patches would likely push it over the edge. I'd elect to keep them separate.

Show 10 quoted lines
> Actually, my preference goes for a first patch that introduces the tests
> with test_expect_failure for things that are not yet implemented (and
> you can check that tests do not pass yet before you code), and then the
> patch introducing the feature doing
>
> -test_expect_failure
> +test_expect_success
>
> which documents quite clearly and concisely that you just made the
> feature work.

I also tend to favor adding "failure" tests which are flipped to "success" when appropriate, however, as this is an entirely new feature, this approach may be unsuitable (and perhaps overkill). Generally speaking, these new tests don't really make sense without the feature; and, more specifically, due to their nature, several of them will pass even without the feature implemented. As such, the current patch organization seems reasonable.

Previous: Matthieu MoyNext: Matthieu Moy
Message 8 of 15 in “git-credential-store: support multiple credential files”
  1. 1/4 git-credential-store: support multiple credential filesPaul Tan, Mar 18, 2015
  2. 2/4 git-credential-store: support XDG_CONFIG_HOMEPaul Tan, Mar 18, 2015
  3. 3/4 docs/git-credential-store: document XDG file and precedencePaul Tan, Mar 18, 2015
  4. Matthieu MoyMar 18, 2015
  5. Paul TanMar 21, 2015
  6. 4/4 t0302: test credential-store support for XDG_CONFIG_HOMEPaul Tan, Mar 18, 2015
  7. Matthieu MoyMar 18, 2015
  8. Eric SunshineMar 18, 2015
  9. Matthieu MoyMar 19, 2015
  10. Paul TanMar 21, 2015
  11. Eric SunshineMar 18, 2015
  12. Eric SunshineMar 19, 2015
  13. Paul TanMar 21, 2015
  14. Eric SunshineMar 23, 2015
  15. Matthieu MoyMar 18, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.