From: Junio C Hamano Date: Tue, 19 May 2015 20:17:58 +0000 (-0700) Subject: Merge branch 'kn/cat-file-literally' X-Git-Tag: v2.5.0-rc0~105 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3b7d373ae2618690170f93bd19883915851de903 Merge branch 'kn/cat-file-literally' Add the "--allow-unknown-type" option to "cat-file" to allow inspecting loose objects of an experimental or a broken type. * kn/cat-file-literally: t1006: add tests for git cat-file --allow-unknown-type cat-file: teach cat-file a '--allow-unknown-type' option cat-file: make the options mutually exclusive sha1_file: support reading from a loose object of unknown type --- 3b7d373ae2618690170f93bd19883915851de903 diff --cc cache.h index 54f108a28f,38419c3a17..c97d8071e1 --- a/cache.h +++ b/cache.h @@@ -870,15 -836,9 +870,16 @@@ char *strip_path_suffix(const char *pat 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 + #define LOOKUP_UNKNOWN_OBJECT 2 extern void *read_sha1_file_extended(const unsigned char *sha1, enum object_type *type, unsigned long *size, unsigned flag); static inline void *read_sha1_file(const unsigned char *sha1, enum object_type *type, unsigned long *size) {