this 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` t
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 wrote:
> > Hello everyone,
> >
> > I am a student studying Computer Science at Cornell University. I
> > already completed a microproj
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
> 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
`$XDG_
Signed-off-by: Devin Lehmacher
---
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/t0301-credential-cache.sh
+++ b/t
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
---
cache.h | 7 +++
path.c | 15 +++
2 files changed, 22 inser
under $XDG_CACHE_HOME/git/ in the future and to
make the socket's purpose clear.
Signed-off-by: Devin Lehmacher
---
Documentation/git-credential-cache.txt | 11 +++
credential-cache.c | 15 ++-
2 files changed, 21 insertions(+), 5 deletions(-)
di
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
---
cache.h | 7 +++
path.c | 15 +++
2 files changed, 22 inser
Signed-off-by: Devin Lehmacher
---
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/t0301-credential-cache.sh
+++ b/t
under $XDG_CACHE_HOME/git/ in the future and to
make the socket's purpose clear.
Signed-off-by: Devin Lehmacher
---
Documentation/git-credential-cache.txt | 11 +++
credential-cache.c | 15 ++-
2 files changed, 21 insertions(+), 5 deletions(-)
di
> > > +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
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 @@ all:
Signed-off-by: Devin Lehmacher
---
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/t0301-credential-cache.sh
+++ b/t
under $XDG_CACHE_HOME/git/ in the future and to
make the socket's purpose clear.
Signed-off-by: Devin Lehmacher
---
Documentation/git-credential-cache.txt | 11 +++
credential-cache.c | 15 ++-
2 files changed, 21 insertions(+), 5 deletions(-)
di
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
---
dir.c | 7
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
---
cache.h | 7 +++
path.c | 15 +++
2 files changed, 22 inser
I implemented all changes from the previous reviews and also wrote a few
tests.
-Devin
> 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
> 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 mailin
> +static int is_socket(char *path) {
> + struct stat sb;
> + int ret = lstat(path, &sb);
> + 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
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
---
cache.h | 7 +++
path.c | 15 +++
2 files changed, 22 inser
under $XDG_CACHE_HOME/git/ in the future and to make the socket's
purpose clear.
Signed-off-by: Devin Lehmacher
Reviewed-by: Junio C Hamano, Jeff King
---
Documentation/git-credential-cache.txt | 10 ++
credential-cache.c | 16 +++-
2 files changed, 21 insert
crashes.
Signed-off-by: Devin Lehmacher
---
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
@@ -83,12 +83,18 @@ static void
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
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
---
cache.h | 7 +++
path.c | 15 +++
2 files changed, 22 inser
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 a
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 a
> 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 i
> 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
> 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
Signed-off-by: Devin Lehmacher
---
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 100644
--- a/Documentation/git-credential
: Devin Lehmacher
---
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 @@ static void do_cache(const char
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|
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
---
cache.h | 7 +++
path.c | 15
location at
`~/.cache/git/credential/socket` and submit a patch and then get more feedback
on the patch.
Devin Lehmacher
to change the default location for this socket and removing the
original location?
Thanks in advanced,
Devin Lehmacher
36 matches
Mail list logo