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 23, 2015, 01:56 UTC
Message-ID
<CAPig+cShTKEVovMRWWPVn7cVMUF7J+ZT_eK4OfOGgn2H4H0TdA@mail.gmail.com>
In-Reply-To
<CACRoPnTXH+HDD42H2ca7b+OPF15v2TxM+y+NRRi2CS_Xg3tGEw@mail.gmail.com>
On Sat, Mar 21, 2015 at 1:46 AM, Paul Tan <pyokagan@gmail.com> wrote:
Show 25 quoted lines
> On Thu, Mar 19, 2015 at 3:26 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>> On Wed, Mar 18, 2015 at 3:04 AM, Paul Tan <pyokagan@gmail.com> wrote:
>>> diff --git a/t/t0302-credential-store.sh b/t/t0302-credential-store.sh
>>> index f61b40c..5b0a666 100755
>>> --- a/t/t0302-credential-store.sh
>>> +++ b/t/t0302-credential-store.sh
>>> @@ -6,4 +6,115 @@ test_description='credential-store tests'
>>> +test_expect_success 'when xdg credentials file does not exist, only write to ~/.git-credentials; do not create xdg file' '
>>
>> These test descriptions are quite long, often mirroring in prose what
>> the test body already says more concisely. I generally try to keep
>> descriptions short while still being descriptive enough to give a
>> general idea about what is being tested. I've rewritten a few test
>> descriptions (below) to be very short, in fact probably too terse; but
>> perhaps better descriptions would lie somewhere between the two
>> extremes. First example, for this test:
>>
>>     "!xdg: >.git-credentials !xdg"
>>
> I will make the test descriptions shorter. However, I don't think the
> test descriptions need to be so terse such that a separate key is
> required. e.g. I will shorten the above to "when xdg file does not
> exist, it's not created.", or even terser: "when xdg file not exists,
> it's not created.". I don't think symbols should be used, as many
> other test descriptions do not use them.
Your updated test descriptions all sound fine.
Show 10 quoted lines
>>> +XDG_CONFIG_HOME="$HOME/xdg" && export XDG_CONFIG_HOME && helper_test store
>>> +unset XDG_CONFIG_HOME
>>
>> It's hard to spot the "helper_test store" at the end of line. I'd
>> place it on a line by itself so that it is easy to see that it is
>> wrapped by the setting and unsetting of the environment variable.
>
> Thanks, will fix. Although now it looks weird that the "export" is the
> only one with a continuation on a single line, so I split all of them
> so that they each have their own line.

An &&-chain outside of a test is not meaningful in this case, so I meant either this:

    XDG_CONFIG_HOME="$HOME/xdg"
    export XDG_CONFIG_HOME
    helper_test store
    unset XDG_CONFIG_HOME

or, slightly more compact (using && just to combine the assignment and export on one line):

    XDG_CONFIG_HOME="$HOME/xdg" && export XDG_CONFIG_HOME
    helper_test store
    unset XDG_CONFIG_HOME
Previous: Paul TanNext: Matthieu Moy
Message 14 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.