summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-06-05 19:00:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-06-05 19:00:04 (GMT)
commitd9c82fa7a75ae617718f195bb5f5ff5c904f2687 (patch)
tree202fad68c8cd4f1dc82f7e51bbd3b53eb391c077 /cache.h
parent9eabf5b536662000f79978c4d1b6e4eff5c8d785 (diff)
parent846e5dfbab5d5a0a85252c1400dc0371e02e75a8 (diff)
downloadgit-d9c82fa7a75ae617718f195bb5f5ff5c904f2687.zip
git-d9c82fa7a75ae617718f195bb5f5ff5c904f2687.tar.gz
git-d9c82fa7a75ae617718f195bb5f5ff5c904f2687.tar.bz2
Merge branch 'pt/xdg-config-path' into maint
Code clean-up for xdg configuration path support. * pt/xdg-config-path: path.c: remove home_config_paths() git-config: replace use of home_config_paths() git-commit: replace use of home_config_paths() credential-store.c: replace home_config_paths() with xdg_config_home() dir.c: replace home_config_paths() with xdg_config_home() attr.c: replace home_config_paths() with xdg_config_home() path.c: implement xdg_config_home() t0302: "unreadable" test needs POSIXPERM t0302: test credential-store support for XDG_CONFIG_HOME git-credential-store: support XDG_CONFIG_HOME git-credential-store: support multiple credential files
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index e42be4b..badf3da 100644
--- a/cache.h
+++ b/cache.h
@@ -816,7 +816,6 @@ enum scld_error safe_create_leading_directories(char *path);
enum scld_error safe_create_leading_directories_const(const char *path);
int mkdir_in_gitdir(const char *path);
-extern void home_config_paths(char **global, char **xdg, char *file);
extern char *expand_user_path(const char *path);
const char *enter_repo(const char *path, int strict);
static inline int is_absolute_path(const char *path)
@@ -836,6 +835,13 @@ char *strip_path_suffix(const char *path, const char *suffix);
int daemon_avoid_alias(const char *path);
extern int is_ntfs_dotgit(const char *name);
+/**
+ * Return a newly allocated string with the evaluation of
+ * "$XDG_CONFIG_HOME/git/$filename" if $XDG_CONFIG_HOME is non-empty, otherwise
+ * "$HOME/.config/git/$filename". Return NULL upon error.
+ */
+extern char *xdg_config_home(const char *filename);
+
/* object replacement */
#define LOOKUP_REPLACE_OBJECT 1
extern void *read_sha1_file_extended(const unsigned char *sha1, enum object_type *type, unsigned long *size, unsigned flag);