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

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

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Mar 9, 2015, 12:36 UTC
Message-ID
<vpqk2yqcppi.fsf@anie.imag.fr>
In-Reply-To
<1425801532-8483-5-git-send-email-pyokagan@gmail.com>
Paul Tan <pyokagan@gmail.com> writes:
Show 12 quoted lines
> diff --git a/t/t0302-credential-store.sh b/t/t0302-credential-store.sh
> index f61b40c..7fe832d 100755
> --- a/t/t0302-credential-store.sh
> +++ b/t/t0302-credential-store.sh
> @@ -5,5 +5,97 @@ test_description='credential-store tests'
>  . "$TEST_DIRECTORY"/lib-credential.sh
>  
>  helper_test store
> +test_expect_success '~/.git-credentials is written to when xdg credentials file does not exist' '
> +	test -s "$HOME/.git-credentials"
> +'
> +test_expect_success 'xdg credentials file will not be created if it does not exist' '
We usually put a blank line between tests.
> +helper_test store

That seems a bit "brute force" to me to re-run all tests several times. It's probably OK since the tests are quite fast though.

> +test_expect_success 'set up custom XDG_CONFIG_HOME credential file' '
> +	XDG_CONFIG_HOME="$HOME/xdg" && export XDG_CONFIG_HOME &&
> +	mkdir -p "$HOME/xdg/git" &&

I'd spell that "$XDG_CONFIG_HOME"/git instead, but that's not really important.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Paul TanNext: Paul Tan
Message 7 of 8 in “git-credential-store: XDG user-specific config file support”
  1. 0/4 git-credential-store: XDG user-specific config file supportPaul Tan, Mar 8, 2015
  2. 1/4 git-credential-store: support multiple credential filesPaul Tan, Mar 8, 2015
  3. 2/4 git-credential-store: support XDG_CONFIG_HOMEPaul Tan, Mar 8, 2015
  4. Paul TanMar 10, 2015
  5. 3/4 docs/git-credential-store: document XDG file and precedencePaul Tan, Mar 8, 2015
  6. 4/4 t0302: test credential-store support for XDG_CONFIG_HOMEPaul Tan, Mar 8, 2015
  7. Matthieu MoyMar 9, 2015
  8. Paul TanMar 10, 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.