Re: [PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-17 Thread Paul Tan
Hi all, thanks for providing your feedback. On Sun, Mar 15, 2015 at 6:14 AM, Junio C Hamano wrote: > I am not sure if this is not a premature over-engineering---I am not > convinced that such a future need will be fulfilled by passing just > a single default_fn this version already passes, or it

Re: [PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-15 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano writes: > >> Paul Tan writes: >> I think you could even get away without passing default_fn here, and just use the rule "the first file in the list is the default". Unless you are anticipating ever passing something else, but I couldn't think

Re: [PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-15 Thread Matthieu Moy
Junio C Hamano writes: > Paul Tan writes: > >>> I think you could even get away without passing default_fn here, and >>> just use the rule "the first file in the list is the default". Unless >>> you are anticipating ever passing something else, but I couldn't think >>> of a case where that would

Re: [PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-14 Thread Junio C Hamano
Paul Tan writes: >> I think you could even get away without passing default_fn here, and >> just use the rule "the first file in the list is the default". Unless >> you are anticipating ever passing something else, but I couldn't think >> of a case where that would be useful. > > Even though in t

Re: [PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-14 Thread Jeff King
On Sat, Mar 14, 2015 at 01:33:28PM -0400, Jeff King wrote: > On Sat, Mar 14, 2015 at 04:15:53PM +0800, Paul Tan wrote: > > > Even though in this case the store_credential() function is not used > > anywhere else, from my personal API design experience I think that > > cementing the rule of "the f

Re: [PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-14 Thread Jeff King
On Sat, Mar 14, 2015 at 04:15:53PM +0800, Paul Tan wrote: > Even though in this case the store_credential() function is not used > anywhere else, from my personal API design experience I think that > cementing the rule of "the first file in the list is the default" in > the behavior of the functio

Re: [PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-14 Thread Paul Tan
On Fri, Mar 13, 2015 at 2:15 PM, Jeff King wrote: >> +static void store_credential(const struct string_list *fns, struct >> credential *c, >> + const char *default_fn) > > I think you could even get away without passing default_fn here, and > just use the rule "the first

Re: [PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-12 Thread Jeff King
On Wed, Mar 11, 2015 at 02:49:10PM +0800, Paul Tan wrote: > Previously, git-credential-store only supported storing credentials in a > single file: ~/.git-credentials. In order to support the XDG base > directory specification[1], git-credential-store needs to be able to > lookup and erase credent

[PATCH v3 1/4] git-credential-store: support multiple credential files

2015-03-10 Thread Paul Tan
Previously, git-credential-store only supported storing credentials in a single file: ~/.git-credentials. In order to support the XDG base directory specification[1], git-credential-store needs to be able to lookup and erase credentials from multiple files, as well as to pick the appropriate file t