diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-10-31 02:08:58 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-10-31 02:08:58 +0100 |
commit | 98b35e2c749614446b916230148d66857e8a09f3 (patch) | |
tree | 3cf15ee4e22a7ebf84e92b019a26ef424d540857 /cache.h | |
parent | Fix potentially dangerous uses of mkpath and git_path (diff) | |
parent | Use git_pathdup instead of xstrdup(git_path(...)) (diff) | |
download | git-98b35e2c749614446b916230148d66857e8a09f3.tar.xz git-98b35e2c749614446b916230148d66857e8a09f3.zip |
Merge branch 'ar/maint-mksnpath' into ar/mksnpath
* ar/maint-mksnpath:
Use git_pathdup instead of xstrdup(git_path(...))
git_pathdup: returns xstrdup-ed copy of the formatted path
Fix potentially dangerous use of git_path in ref.c
Add git_snpath: a .git path formatting routine with output buffer
Conflicts:
builtin-revert.c
refs.c
rerere.c
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -497,6 +497,10 @@ extern int check_repository_format(void); extern char *mksnpath(char *buf, size_t n, const char *fmt, ...) __attribute__((format (printf, 3, 4))); +extern char *git_snpath(char *buf, size_t n, const char *fmt, ...) + __attribute__((format (printf, 3, 4))); +extern char *git_pathdup(const char *fmt, ...) + __attribute__((format (printf, 1, 2))); /* Return a statically allocated filename matching the sha1 signature */ extern char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2))); |