summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2009-11-17 17:24:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-11-18 05:53:11 (GMT)
commit395de250d9d9762b8ac1ce98b297d60d0b5bd643 (patch)
tree6cd72d671e9ec56fdc87fa0c21484881b5a2ab00 /cache.h
parent78d553b7d7b269bb22ebd8b1198657c37484a3a0 (diff)
downloadgit-395de250d9d9762b8ac1ce98b297d60d0b5bd643.zip
git-395de250d9d9762b8ac1ce98b297d60d0b5bd643.tar.gz
git-395de250d9d9762b8ac1ce98b297d60d0b5bd643.tar.bz2
Expand ~ and ~user in core.excludesfile, commit.template
These config variables are parsed to substitute ~ and ~user with getpw entries. user_path() refactored into new function expand_user_path(), to allow dynamically allocating the return buffer. Original patch by Karl Chen, modified by Matthieu Moy, and further amended by Junio C Hamano. Signed-off-by: Karl Chen <quarl@quarl.org> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index a5eeead..e643a99 100644
--- a/cache.h
+++ b/cache.h
@@ -644,6 +644,7 @@ int set_shared_perm(const char *path, int mode);
#define adjust_shared_perm(path) set_shared_perm((path), 0)
int safe_create_leading_directories(char *path);
int safe_create_leading_directories_const(const char *path);
+extern char *expand_user_path(const char *path);
char *enter_repo(char *path, int strict);
static inline int is_absolute_path(const char *path)
{
@@ -902,6 +903,7 @@ extern unsigned long git_config_ulong(const char *, const char *);
extern int git_config_bool_or_int(const char *, const char *, int *);
extern int git_config_bool(const char *, const char *);
extern int git_config_string(const char **, const char *, const char *);
+extern int git_config_pathname(const char **, const char *, const char *);
extern int git_config_set(const char *, const char *);
extern int git_config_set_multivar(const char *, const char *, const char *, int);
extern int git_config_rename_section(const char *, const char *);