git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [GSoC][PATCH 0/3] Move ~/.git-credential-cache to ~/.cache/git
@ 2017-03-13 17:22 Devin Lehmacher
  2017-03-13 17:22 ` [GSoC][PATCH 1/3] path.c: Add xdg_cache_home to get paths under XDG_CACHE_HOME Devin Lehmacher
                   ` (2 more replies)
  0 siblings, 3 replies; 55+ messages in thread
From: Devin Lehmacher @ 2017-03-13 17:22 UTC (permalink / raw)
  To: git

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                                |  7 +++++++
credential-cache.c                     | 15 ++++++++++++++-
path.c                                 | 15 +++++++++++++++
4 files changed, 38 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 55+ messages in thread
* Re: [GSoC][PATCH v4 4/4] credential-cache: add tests for XDG functionality
@ 2017-03-16 21:03 Devin Lehmacher
  0 siblings, 0 replies; 55+ messages in thread
From: Devin Lehmacher @ 2017-03-16 21:03 UTC (permalink / raw)
  To: Jeff King; +Cc: git, Junio C Hamano, 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
> > > + password=store-pass
> > > + EOF
> > > + test -S "$HOME/dir/socket" &&
> > > + git credential-cache exit
> > > +'
>
> This is almost right, except:
>
>   - the "exit" needs to be told which socket to use
>
>   - we should do the "exit" even when the test fails early (so in
>     test_when_finished)
>
>   - the test_when_finished block will interpolate $HOME when setting up
>     the block, which will break if it contains double-quotes or other
>     special characters. It should use \$HOME.
>
>     I suspect the "check" invocation needs to do so as well, though it
>     is even trickier (we shove it into a single-quoted "-c" argument).
>
>     I think you could get by in both cases with relative paths.

Using a relative path won't work since `git credential-cache --socket`
only accepts absolute paths. It shouldn't be too hard to escape the
string though.

-Devin

^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2017-03-17 19:32 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 17:22 [GSoC][PATCH 0/3] Move ~/.git-credential-cache to ~/.cache/git Devin Lehmacher
2017-03-13 17:22 ` [GSoC][PATCH 1/3] path.c: Add xdg_cache_home to get paths under XDG_CACHE_HOME Devin Lehmacher
2017-03-13 18:48   ` Jeff King
2017-03-13 19:44     ` Devin Lehmacher
2017-03-13 17:22 ` [GSoC][PATCH 2/3] credential-cache.c: Make git use XDG_CACHE_HOME for credentials Devin Lehmacher
2017-03-13 18:09   ` Junio C Hamano
2017-03-13 19:03     ` Jeff King
2017-03-13 19:05       ` Junio C Hamano
2017-03-13 19:24         ` Devin Lehmacher
2017-03-13 19:22     ` Devin Lehmacher
2017-03-13 18:11   ` Junio C Hamano
2017-03-13 19:01   ` Jeff King
2017-03-13 17:22 ` [GSoC][PATCH 3/3] Update documentation to reflect new socket location Devin Lehmacher
2017-03-13 18:04   ` Junio C Hamano
2017-03-13 20:42   ` [GSoC][PATCH v2 2/2] credential-cache: use XDG_CACHE_HOME for socket Devin Lehmacher
2017-03-13 20:43   ` [GSoC][PATCH v2 1/2] path.c: add xdg_cache_home Devin Lehmacher
2017-03-13 20:43     ` [GSoC][PATCH v2 2/2] credential-cache: use XDG_CACHE_HOME for socket Devin Lehmacher
2017-03-13 21:52       ` Junio C Hamano
2017-03-14  0:32         ` [GSoC][PATCH/RFC v3 0/3] Fix commit messages, check if socket is socket Devin Lehmacher
2017-03-14  0:32           ` [GSoC][PATCH/RFC v3 1/3] path.c: add xdg_cache_home Devin Lehmacher
2017-03-14  0:32           ` [GSoC][PATCH/RFC v3 2/3] credential-cache: use XDG_CACHE_HOME for socket Devin Lehmacher
2017-03-14  1:50             ` Junio C Hamano
2017-03-14  0:32           ` [GSoC][PATCH/RFC v3 3/3] credential-cache: only use user_socket if a socket Devin Lehmacher
2017-03-14  0:40             ` Devin Lehmacher
2017-03-14  0:44               ` Brandon Williams
2017-03-14  1:30                 ` Devin Lehmacher
2017-03-14 17:03                   ` Brandon Williams
2017-03-14  1:52             ` Junio C Hamano
2017-03-14  6:10               ` Junio C Hamano
2017-03-14  6:17                 ` Devin Lehmacher
2017-03-16  5:18             ` [GSoC][PATCH v4 0/4] Moving credential-cache socket to xdg path Devin Lehmacher
2017-03-16  5:18               ` [GSoC][PATCH v4 1/4] path.c: add xdg_cache_home Devin Lehmacher
2017-03-16  5:18               ` [GSoC][PATCH v4 2/4] dir: add directory_exists Devin Lehmacher
2017-03-16 16:09                 ` Junio C Hamano
2017-03-16 18:26                   ` Junio C Hamano
2017-03-16  5:18               ` [GSoC][PATCH v4 3/4] credential-cache: use XDG_CACHE_HOME for socket Devin Lehmacher
2017-03-16 16:20                 ` Junio C Hamano
2017-03-16 18:02                   ` Jeff King
2017-03-16  5:18               ` [GSoC][PATCH v4 4/4] credential-cache: add tests for XDG functionality Devin Lehmacher
2017-03-16 16:29                 ` Junio C Hamano
2017-03-16 17:58                   ` Jeff King
2017-03-17  2:53                 ` [GSoC][PATCH v5 1/3] path.c: add xdg_cache_home Devin Lehmacher
2017-03-17  2:53                   ` [GSoC][PATCH v5 2/3] credential-cache: use XDG_CACHE_HOME for socket Devin Lehmacher
2017-03-17 16:12                     ` Ramsay Jones
2017-03-17 19:31                       ` Devin Lehmacher
2017-03-17  2:53                   ` [GSoC][PATCH v5 3/3] credential-cache: add tests for XDG functionality Devin Lehmacher
2017-03-17  5:38                     ` Junio C Hamano
2017-03-17 12:36                     ` [GSoC][PATCH v6 1/3] path.c: add xdg_cache_home Devin Lehmacher
2017-03-17 12:36                       ` [GSoC][PATCH v6 2/3] credential-cache: use XDG_CACHE_HOME for socket Devin Lehmacher
2017-03-17 13:42                         ` Jeff King
2017-03-17 12:36                       ` [GSoC][PATCH v6 3/3] credential-cache: add tests for XDG functionality Devin Lehmacher
2017-03-17 13:38                         ` Jeff King
2017-03-17 13:42                       ` [GSoC][PATCH v6 1/3] path.c: add xdg_cache_home Jeff King
2017-03-13 21:39     ` [GSoC][PATCH v2 1/2] " Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2017-03-16 21:03 [GSoC][PATCH v4 4/4] credential-cache: add tests for XDG functionality Devin Lehmacher

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).