wrapper: move odb_* to environment.c
The odb_mkstemp and odb_pack_keep functions open files under the $GIT_OBJECT_DIRECTORY directory. This requires access to the git configuration which very simple programs do not need. Move these functions to environment.o, closer to their dependencies. This should make it easier for programs to link to wrapper.o without linking to environment.o. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
58ecbd5ede
commit
463db9b104
@ -404,6 +404,7 @@ extern ssize_t xwrite(int fd, const void *buf, size_t len);
|
||||
extern int xdup(int fd);
|
||||
extern FILE *xfdopen(int fd, const char *mode);
|
||||
extern int xmkstemp(char *template);
|
||||
extern int xmkstemp_mode(char *template, int mode);
|
||||
extern int odb_mkstemp(char *template, size_t limit, const char *pattern);
|
||||
extern int odb_pack_keep(char *name, size_t namesz, unsigned char *sha1);
|
||||
|
||||
|
Reference in New Issue
Block a user