On 03/13, Devin Lehmacher wrote:
> > 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
> 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
Junio C Hamano writes:
> Devin Lehmacher writes:
>
>> 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 do_cache(const char
Devin Lehmacher writes:
> 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 do_cache(const char *socket, const char
> *action, int timeout,
>
> 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
On 03/13, Devin Lehmacher wrote:
> > +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
> +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
Create function is_socket.
Make get_socket_path return check if ~/.git-credential-cache/socket is a
socket and not just a file. If file_exists behavior could change in an
unexpected way. Additionally a file at ~/.git-credential-cache/socket
could cause false positives which would otherwise lead to
8 matches
Mail list logo