Re: git v2.13.0-rc0 test failures on cygwin

2017-04-28 Thread Devin Lehmacher
passed in v2.12.2. > `git bisect` tells me this failure was introduced by commit > v2.12.0-267-g612c49e94, added by Devin Lehmacher (added to the CC > list). Can someone with cygwin check that `test -S` works on cygwin? The only that tests that failed are those that use `test -S` to c

Re: [GSoC] Proposal Discussion

2017-03-28 Thread Devin Lehmacher
On Tue, Mar 28, 2017 at 07:52:42AM +0200, Christian Couder wrote: > Hi, > > On Tue, Mar 28, 2017 at 12:17 AM, Devin Lehmacher <lehma...@gmail.com> wrote: > > Hello everyone, > > > > I am a student studying Computer Science at Cornell University. I > > alread

[GSoC] Proposal Discussion

2017-03-27 Thread Devin Lehmacher
Hello everyone, I am a student studying Computer Science at Cornell University. I already completed a microproject, Move ~/.git-credential-cache/socket to $XDG_CACHE_HOME/credential/socket a week and a half ago or so. I am interested in 2 different projects and would like some advice on them, to

Re: [GSoC][PATCH v5 2/3] credential-cache: use XDG_CACHE_HOME for socket

2017-03-17 Thread Devin Lehmacher
> or $HOME/.cache/git/credential/socket if $XDG_CACHE_HOME is not set. > I don't have a good suggestion to re-word this paragraph. (I just > spent ten minutes trying!). I think it would not be too bad to not include this though because `$HOME/.cache/` is what XDG specifies as the default if

[GSoC][PATCH v6 3/3] credential-cache: add tests for XDG functionality

2017-03-17 Thread Devin Lehmacher
Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- t/t0301-credential-cache.sh | 93 + 1 file changed, 93 insertions(+) diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh index 82c841121..fd92533ac 100755 --- a/t

[GSoC][PATCH v6 1/3] path.c: add xdg_cache_home

2017-03-17 Thread Devin Lehmacher
We already have xdg_config_home to format paths relative to XDG_CONFIG_HOME. Let's provide a similar function xdg_cache_home to do the same for paths relative to XDG_CACHE_HOME. Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- cache.h | 7 +++ path.c | 15 +++ 2

[GSoC][PATCH v6 2/3] credential-cache: use XDG_CACHE_HOME for socket

2017-03-17 Thread Devin Lehmacher
$XDG_CACHE_HOME/git/ in the future and to make the socket's purpose clear. Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- Documentation/git-credential-cache.txt | 11 +++ credential-cache.c | 15 ++- 2 files changed, 21 insertions(+), 5 del

[GSoC][PATCH v5 1/3] path.c: add xdg_cache_home

2017-03-16 Thread Devin Lehmacher
We already have xdg_config_home to format paths relative to XDG_CONFIG_HOME. Let's provide a similar function xdg_cache_home to do the same for paths relative to XDG_CACHE_HOME. Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- cache.h | 7 +++ path.c | 15 +++ 2

[GSoC][PATCH v5 3/3] credential-cache: add tests for XDG functionality

2017-03-16 Thread Devin Lehmacher
Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- t/t0301-credential-cache.sh | 94 + 1 file changed, 94 insertions(+) diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh index 82c841121..82c4dfa07 100755 --- a/t

[GSoC][PATCH v5 2/3] credential-cache: use XDG_CACHE_HOME for socket

2017-03-16 Thread Devin Lehmacher
$XDG_CACHE_HOME/git/ in the future and to make the socket's purpose clear. Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- Documentation/git-credential-cache.txt | 11 +++ credential-cache.c | 15 ++- 2 files changed, 21 insertions(+), 5 del

Re: [GSoC][PATCH v4 4/4] credential-cache: add tests for XDG functionality

2017-03-16 Thread Devin Lehmacher
> > > +test_expect_success 'credential-cache --socket option overrides default > > > location' ' > > > + test_when_finished "rm -rf \"$HOME\"/dir/" && > > > + check approve "cache --socket \"$HOME/dir/socket\"" <<-\EOF && > > > + protocol=https > > > + host=example.com > > > + username=store-user

[PATCH] Makefile: escape ' in bin-wrappers rule

2017-03-16 Thread Devin Lehmacher
If the pwd contains a ' escape it as '\'' so that git will not fail while building on a path containing '. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ed68700ac..5cf5d8537 100644 --- a/Makefile +++ b/Makefile @@ -2276,7 +2276,7 @@

[GSoC][PATCH v4 4/4] credential-cache: add tests for XDG functionality

2017-03-15 Thread Devin Lehmacher
Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- t/t0301-credential-cache.sh | 64 + 1 file changed, 64 insertions(+) diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh index 82c841121..664c6dda1 100755 --- a/t

[GSoC][PATCH v4 3/4] credential-cache: use XDG_CACHE_HOME for socket

2017-03-15 Thread Devin Lehmacher
$XDG_CACHE_HOME/git/ in the future and to make the socket's purpose clear. Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- Documentation/git-credential-cache.txt | 11 +++ credential-cache.c | 15 ++- 2 files changed, 21 insertions(+), 5 del

[GSoC][PATCH v4 2/4] dir: add directory_exists

2017-03-15 Thread Devin Lehmacher
file_exists currently only does an lstat to see if anything is at the path. For some purposes it would be better to ensure that a path is a certain type of file. Add function directory_exists that checks if a path exists and is a directory. Signed-off-by: Devin Lehmacher <lehma...@gmail.

[GSoC][PATCH v4 1/4] path.c: add xdg_cache_home

2017-03-15 Thread Devin Lehmacher
We already have xdg_config_home to format paths relative to XDG_CONFIG_HOME. Let's provide a similar function xdg_cache_home to do the same for paths relative to XDG_CACHE_HOME. Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- cache.h | 7 +++ path.c | 15 +++ 2

[GSoC][PATCH v4 0/4] Moving credential-cache socket to xdg path

2017-03-15 Thread Devin Lehmacher
I implemented all changes from the previous reviews and also wrote a few tests. -Devin

Re: [GSoC][PATCH/RFC v3 3/3] credential-cache: only use user_socket if a socket

2017-03-14 Thread Devin Lehmacher
> Also I think you would want to use S_ISFIFO() and/or S_ISSOCK() > macros (I do not offhand recall which one credential cache daemon > uses), not the S_IFxxx constant. Huh. These macros are not on the man page for lstat. > Having said that, I do not think ~/.git-credential-cache/socket is > the

Re: [GSoC][PATCH/RFC v3 3/3] credential-cache: only use user_socket if a socket

2017-03-13 Thread Devin Lehmacher
> Best practice for submitting patches would be to ensure that each patch > compiles without errors (with the DEVELOPER=1 flag set) and that the > entire test suite passes with no errors; this is to maintain > bisect-ability. Only after you've done this should you send your > patches to the

Re: [GSoC][PATCH/RFC v3 3/3] credential-cache: only use user_socket if a socket

2017-03-13 Thread Devin Lehmacher
> +static int is_socket(char *path) { > + struct stat sb; > + int ret = lstat(path, ); > + return ret && S_IFSOCK(sb.st_mode); > +} This patch won’t even compile. S_IFSOCK(sb.st_mode) should have been S_IFSOCK & sb.st_mode. (I guess I should have compiled first) After making that

[GSoC][PATCH/RFC v3 1/3] path.c: add xdg_cache_home

2017-03-13 Thread Devin Lehmacher
We already have xdg_config_home to format paths relative to XDG_CONFIG_HOME. Let's provide a similar function xdg_cache_home to do the same for paths relative to XDG_CACHE_HOME. Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- cache.h | 7 +++ path.c | 15 +++ 2

[GSoC][PATCH/RFC v3 2/3] credential-cache: use XDG_CACHE_HOME for socket

2017-03-13 Thread Devin Lehmacher
$XDG_CACHE_HOME/git/ in the future and to make the socket's purpose clear. Signed-off-by: Devin Lehmacher <lehma...@gmail.com> Reviewed-by: Junio C Hamano, Jeff King --- Documentation/git-credential-cache.txt | 10 ++ credential-cache.c | 16 +++- 2 files chang

[GSoC][PATCH/RFC v3 3/3] credential-cache: only use user_socket if a socket

2017-03-13 Thread Devin Lehmacher
to crashes. Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- credential-cache.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/credential-cache.c b/credential-cache.c index db1343b46..63236adc2 100644 --- a/credential-cache.c +++ b/credential-cache.c @@

[GSoC][PATCH/RFC v3 0/3] Fix commit messages, check if socket is socket

2017-03-13 Thread Devin Lehmacher
I fixed all of the commit messages and the weird indentation. I also now check that the socket is actually a socket. What do you think of the function is_socket? Is it general enough to be put in dir.h or unix_socket.h for use in other files? Or should it be left as is? - Devin

[GSoC][PATCH v2 1/2] path.c: add xdg_cache_home

2017-03-13 Thread Devin Lehmacher
We already have xdg_config_home to format paths relative to XDG_CONFIG_HOME. Let's provide a similar function xdg_cache_home to do the same for paths relative to XDG_CACHE_HOME. Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- cache.h | 7 +++ path.c | 15 +++ 2

[GSoC][PATCH v2 2/2] credential-cache: use XDG_CACHE_HOME for socket

2017-03-13 Thread Devin Lehmacher
git-credential-cache will now use a socket following the XDG base path specification by default. This increases consistency with other applications and helps keep clutter out of users' home directories. We still check the old socket location, ~/.git-credential-cache/socket first in case the user

[GSoC][PATCH v2 2/2] credential-cache: use XDG_CACHE_HOME for socket

2017-03-13 Thread Devin Lehmacher
git-credential-cache will now use a socket following the XDG base path specification by default. This increases consistency with other applications and helps keep clutter out of users' home directories. We still check the old socket location, ~/.git-credential-cache/socket first in case the user

Re: [GSoC][PATCH 1/3] path.c: Add xdg_cache_home to get paths under XDG_CACHE_HOME

2017-03-13 Thread Devin Lehmacher
> And one final note. I notice that we return NULL if the user has no > HOME. But I'm not sure most callers are prepared to handle this. E.g., > if you have no ident set and no HOME, then we will pass NULL to lstat(). > On Linux at least that just gets you EFAULT, but I wouldn't be surprised > if

Re: [GSoC][PATCH 2/3] credential-cache.c: Make git use XDG_CACHE_HOME for credentials

2017-03-13 Thread Devin Lehmacher
> They wouldn't. It was my oblique way to say "it is unclear from the > patch description and the code why this is a good idea---it needs to > be explained better" ;-). Ok, I will submit a new patch with a better explanation. Devin

Re: [GSoC][PATCH 2/3] credential-cache.c: Make git use XDG_CACHE_HOME for credentials

2017-03-13 Thread Devin Lehmacher
> I somehow feel that the order of precedence should be the other way > around, though. > > If somebody really wants to use the xdg location and has a socket > already there, using that existing socket would be the right thing > to do. However, when neither ~/.git-credential-cache/socket nor

[GSoC][PATCH 3/3] Update documentation to reflect new socket location

2017-03-13 Thread Devin Lehmacher
Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- Documentation/git-credential-cache.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/git-credential-cache.txt b/Documentation/git-credential-cache.txt index 96208f822..4b9db3856

[GSoC][PATCH 2/3] credential-cache.c: Make git use XDG_CACHE_HOME for credentials

2017-03-13 Thread Devin Lehmacher
-by: Devin Lehmacher <lehma...@gmail.com> --- credential-cache.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/credential-cache.c b/credential-cache.c index cc8a6ee19..75c917de7 100644 --- a/credential-cache.c +++ b/credential-cache.c @@ -83,6 +83,19 @@ stati

[GSoC][PATCH 0/3] Move ~/.git-credential-cache to ~/.cache/git

2017-03-13 Thread Devin Lehmacher
Patches for my Microproject. I took into consideration the feedback I recieved on an earlier email thread and now look for a socket at the old default location before creating a new socket in $XDG_CACHE_HOME. Documentation/git-credential-cache.txt | 3 ++- cache.h|

[GSoC][PATCH 1/3] path.c: Add xdg_cache_home to get paths under XDG_CACHE_HOME

2017-03-13 Thread Devin Lehmacher
This is necessary to make it posible to use XDG_CACHE_HOME for caches in the XDG standard. I modeled this after the very similar xdg_config_home function for obtaining paths to functions under XDG_CONFIG_HOME Signed-off-by: Devin Lehmacher <lehma...@gmail.com> --- cache.h | 7 +++

Re: [GSoC] Move ~/.git-credential-cache to ~/.cache/git

2017-03-10 Thread Devin Lehmacher
location at `~/.cache/git/credential/socket` and submit a patch and then get more feedback on the patch. Devin Lehmacher

[GSoC] Move ~/.git-credential-cache to ~/.cache/git

2017-03-10 Thread Devin Lehmacher
to change the default location for this socket and removing the original location? Thanks in advanced, Devin Lehmacher