#define CONFIG_LOCAL_ENVIRONMENT "GIT_CONFIG_LOCAL"
#define EXEC_PATH_ENVIRONMENT "GIT_EXEC_PATH"
-extern int is_bare_git_dir(const char *dir);
+extern int is_bare_repository_cfg;
+extern int is_bare_repository(void);
+extern int is_inside_git_dir(void);
extern const char *get_git_dir(void);
extern char *get_object_directory(void);
extern char *get_refs_directory(void);
extern char *sha1_to_hex(const unsigned char *sha1); /* static buffer result! */
extern int read_ref(const char *filename, unsigned char *sha1);
extern const char *resolve_ref(const char *path, unsigned char *sha1, int, int *);
+extern int dwim_ref(const char *str, int len, unsigned char *sha1, char **ref);
+
extern int create_symref(const char *ref, const char *refs_heads_master);
extern int validate_headref(const char *ref);
void datestamp(char *buf, int bufsize);
unsigned long approxidate(const char *);
-extern int setup_ident(void);
-extern void ignore_missing_committer_name();
extern const char *git_author_info(int);
extern const char *git_committer_info(int);
extern struct packed_git {
struct packed_git *next;
struct pack_window *windows;
- unsigned int *index_base;
+ uint32_t *index_base;
off_t index_size;
off_t pack_size;
int pack_fd;
extern struct packed_git *find_sha1_pack(const unsigned char *sha1,
struct packed_git *packs);
-extern void pack_report();
+extern void pack_report(void);
extern unsigned char* use_pack(struct packed_git *, struct pack_window **, unsigned long, unsigned int *);
extern void unuse_pack(struct pack_window **);
extern struct packed_git *add_packed_git(char *, int, int);
extern char *git_log_output_encoding;
extern int copy_fd(int ifd, int ofd);
-extern void read_or_die(int fd, void *buf, size_t count);
-extern int write_in_full(int fd, const void *buf, size_t count, const char *);
+extern int read_in_full(int fd, void *buf, size_t count);
+extern int write_in_full(int fd, const void *buf, size_t count);
extern void write_or_die(int fd, const void *buf, size_t count);
extern int write_or_whine(int fd, const void *buf, size_t count, const char *msg);
+extern int write_or_whine_pipe(int fd, const void *buf, size_t count, const char *msg);
/* pager.c */
extern void setup_pager(void);