Re: [PATCH 1/2] git-credential-store: support XDG config dir

2015-03-06 Thread Matthieu Moy
Paul Tan pyoka...@gmail.com writes: Hi all, Thanks for the review. I apologize for rushing the patch out as I wanted to get feedback on the new behavior before committing to any more code changes. There is no problem sending unfinished versions for discussions. If unsure, send it as

Re: [PATCH 1/2] git-credential-store: support XDG config dir

2015-03-05 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: On Wed, Mar 4, 2015 at 7:01 AM, Junio C Hamano gits...@pobox.com wrote: Paul Tan pyoka...@gmail.com writes: struct credential entry = CREDENTIAL_INIT; + int found_credential = 0; fh = fopen(fn, r); if (!fh) { if

Re: [PATCH 1/2] git-credential-store: support XDG config dir

2015-03-04 Thread Paul Tan
Hi all, Thanks for the review. I apologize for rushing the patch out as I wanted to get feedback on the new behavior before committing to any more code changes. I also wanted to quickly clear any doubts that people may have about my coding ability. (Or maybe it created more ;) ) On Wed, Mar 4,

Re: [PATCH 1/2] git-credential-store: support XDG config dir

2015-03-04 Thread Jeff King
On Wed, Mar 04, 2015 at 04:24:58AM +0800, Paul Tan wrote: @@ -111,8 +114,7 @@ static void remove_credential(const char *fn, struct credential *c) static int lookup_credential(const char *fn, struct credential *c) { - parse_credential_file(fn, c, print_entry, NULL); - return

[PATCH 1/2] git-credential-store: support XDG config dir

2015-03-03 Thread Paul Tan
Teach git-credential-store to read/write credentials from $XDG_CONFIG_HOME/git/credentials and ~/.git-credentials where appropriate: * get: call lookup_credential() on the XDG file first if it exists. If the credential can't be found, call lookup_credential() on the HOME file. * erase: Call

Re: [PATCH 1/2] git-credential-store: support XDG config dir

2015-03-03 Thread Matthieu Moy
Paul Tan pyoka...@gmail.com writes: Teach git-credential-store to read/write credentials from $XDG_CONFIG_HOME/git/credentials and ~/.git-credentials where appropriate: Thanks for your patch. Below is a partial review. Don't take my comments as negative criticisms, they are all directions for

Re: [PATCH 1/2] git-credential-store: support XDG config dir

2015-03-03 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: Teach git-credential-store to read/write credentials from $XDG_CONFIG_HOME/git/credentials and ~/.git-credentials where appropriate: * get: call lookup_credential() on the XDG file first if it exists. If the credential can't be found, call