summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-24 20:07:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-24 20:07:34 (GMT)
commit78cf8efec34c419ecea86bc8d1fe47ec0b51ba37 (patch)
treee93e9c07cd61311d63aa589cfd2452662dfcafb5 /cache.h
parentf364f02724d6ce4c64fae85a86e0452b5634ddf8 (diff)
parent612c49e94d5c761bd9fc4752283b82786c23856a (diff)
downloadgit-78cf8efec34c419ecea86bc8d1fe47ec0b51ba37.zip
git-78cf8efec34c419ecea86bc8d1fe47ec0b51ba37.tar.gz
git-78cf8efec34c419ecea86bc8d1fe47ec0b51ba37.tar.bz2
Merge branch 'dl/credential-cache-socket-in-xdg-cache'
The default location "~/.git-credential-cache/socket" for the socket used to communicate with the credential-cache daemon has been moved to "~/.cache/git/credential/socket". * dl/credential-cache-socket-in-xdg-cache: credential-cache: add tests for XDG functionality credential-cache: use XDG_CACHE_HOME for socket path.c: add xdg_cache_home
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 14f8a06..2214d52 100644
--- a/cache.h
+++ b/cache.h
@@ -1176,6 +1176,13 @@ extern int is_ntfs_dotgit(const char *name);
*/
extern char *xdg_config_home(const char *filename);
+/**
+ * Return a newly allocated string with the evaluation of
+ * "$XDG_CACHE_HOME/git/$filename" if $XDG_CACHE_HOME is non-empty, otherwise
+ * "$HOME/.cache/git/$filename". Return NULL upon error.
+ */
+extern char *xdg_cache_home(const char *filename);
+
/* object replacement */
#define LOOKUP_REPLACE_OBJECT 1
#define LOOKUP_UNKNOWN_OBJECT 2