public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
To: Paul Tan <pyokagan@gmail•com>
Cc: git@vger•kernel.org, Junio C Hamano <gitster@pobox•com>,
	Jeff King <peff@peff•net>,
	Eric Sunshine <sunshine@sunshineco•com>
Subject: Re: [PATCH v4 4/4] t0302: test credential-store support for XDG_CONFIG_HOME
Date: Wed, 18 Mar 2015 17:41:05 +0100	[thread overview]
Message-ID: <vpq3852dzry.fsf@anie.imag.fr> (raw)
In-Reply-To: <1426662276-8728-4-git-send-email-pyokagan@gmail.com> (Paul Tan's message of "Wed, 18 Mar 2015 15:04:36 +0800")

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

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.

Paul Tan <pyokagan@gmail•com> writes:

> +test_expect_success 'if custom XDG_CONFIG_HOME credentials file
> + ~/xdg/git/credentials exists, it will only be written to;
> + ~/.config/git/credentials and ~/.git-credentials will not be
> + created' '
> +	test_when_finished "rm -f $HOME/xdg/git/credentials" &&
> +	test -s "$HOME/xdg/git/credentials" &&
> +	test_path_is_missing "$HOME/.config/git/credentials"
> +	test_path_is_missing "$HOME/.git-credentials"
> +'

Broken &&-chain. That is a real issue that must be fixed.

> +test_expect_success 'get: return credentials from home file if xdg files are unreadable' '

"files are" -> "file is", no?

> +'
> +
> +
> +test_expect_success 'erase: erase matching credentials from both xdg and home files' '

Double blank line.


On overall, except the broken &&-chain above, the whole series looks
good. Feel free to ignore my other nitpicks if you prefer.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2015-03-18 16:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18  7:04 [PATCH v4 1/4] git-credential-store: support multiple credential files Paul Tan
2015-03-18  7:04 ` [PATCH v4 2/4] git-credential-store: support XDG_CONFIG_HOME Paul Tan
2015-03-18  7:04 ` [PATCH v4 3/4] docs/git-credential-store: document XDG file and precedence Paul Tan
2015-03-18 16:23   ` Matthieu Moy
2015-03-21  5:59     ` Paul Tan
2015-03-18  7:04 ` [PATCH v4 4/4] t0302: test credential-store support for XDG_CONFIG_HOME Paul Tan
2015-03-18 16:41   ` Matthieu Moy [this message]
2015-03-18 21:15     ` Eric Sunshine
2015-03-19 13:35       ` Matthieu Moy
2015-03-21 10:01         ` Paul Tan
2015-03-18 19:26   ` Eric Sunshine
2015-03-19 21:53     ` Eric Sunshine
2015-03-21  5:46     ` Paul Tan
2015-03-23  1:56       ` Eric Sunshine
2015-03-18 16:17 ` [PATCH v4 1/4] git-credential-store: support multiple credential files Matthieu Moy

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpq3852dzry.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp$(echo .)fr \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=peff@peff$(echo .)net \
    --cc=pyokagan@gmail$(echo .)com \
    --cc=sunshine@sunshineco$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox