Thread (23 messages) flat view 23 messages, 2 authors, 2016-06-15

Re: [PATCH v3/GSoC 3/5] git-credential-cache: put socket to xdg-compatible path

From: 惠轶群 <hidden>
Date: 2016-06-15 23:08:58

2016-03-25 18:00 GMT+08:00 Jeff King [off-list ref]:
On Wed, Mar 23, 2016 at 06:13:23PM +0800, Hui Yiqun wrote:
quoted
move .git-credential-cache/socket to xdg_runtime_dir("credential-cache.sock")
Motivation?
I will improve my commit message.
quoted
diff --git a/credential-cache.c b/credential-cache.c
index f4afdc6..40d838b 100644
--- a/credential-cache.c
+++ b/credential-cache.c
@@ -105,7 +105,7 @@ int main(int argc, const char **argv)
      op = argv[0];

      if (!socket_path)
-             socket_path = expand_user_path("~/.git-credential-cache/socket");
+             socket_path = xdg_runtime_dir("credential-cache.sock");
      if (!socket_path)
              die("unable to find a suitable socket path; use --socket");
We do our own mkdir and chmod in credential-cache; this should be
redundant with what xdg_runtime_dir() does, and can be removed, right?
But user may specify another path via --socket <path>, this path may have
wrong permission. I'm considering how to handle this situation.
-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help