X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=cache.h;h=89f6a40d1a1011bca4d546c5979d66d44b408ece;hb=31fbae0f813b47801ee79a464a8257346a5f8f2c;hp=4b15042c08afb2ba34ca6d08ebc5ca9b196ab7c8;hpb=df91d0e4d30ddc9bf2c55e3a63be9cb5318a409a;p=git.git diff --git a/cache.h b/cache.h index 4b15042c0..89f6a40d1 100644 --- a/cache.h +++ b/cache.h @@ -182,6 +182,8 @@ struct cache_entry { /* Only remove in work directory, not index */ #define CE_WT_REMOVE (0x400000) +#define CE_UNPACKED (0x1000000) + /* * Extended on-disk flags */ @@ -386,6 +388,15 @@ static inline enum object_type object_type(unsigned int mode) #define GIT_NOTES_REF_ENVIRONMENT "GIT_NOTES_REF" #define GIT_NOTES_DEFAULT_REF "refs/notes/commits" +/* + * Repository-local GIT_* environment variables + * The array is NULL-terminated to simplify its usage in contexts such + * environment creation or simple walk of the list. + * The number of non-NULL entries is available as a macro. + */ +#define LOCAL_REPO_ENV_SIZE 8 +extern const char *const local_repo_env[LOCAL_REPO_ENV_SIZE + 1]; + extern int is_bare_repository_cfg; extern int is_bare_repository(void); extern int is_inside_git_dir(void); @@ -553,6 +564,7 @@ enum branch_track { BRANCH_TRACK_REMOTE, BRANCH_TRACK_ALWAYS, BRANCH_TRACK_EXPLICIT, + BRANCH_TRACK_OVERRIDE, }; enum rebase_setup_type { @@ -638,6 +650,10 @@ int git_mkstemp(char *path, size_t n, const char *template); int git_mkstemps(char *path, size_t n, const char *template, int suffix_len); +/* set default permissions by passing mode arguments to open(2) */ +int git_mkstemps_mode(char *pattern, int suffix_len, int mode); +int git_mkstemp_mode(char *pattern, int mode); + /* * NOTE NOTE NOTE!! * @@ -672,6 +688,7 @@ int normalize_path_copy(char *dst, const char *src); int longest_ancestor_length(const char *path, const char *prefix_list); char *strip_path_suffix(const char *path, const char *suffix); int daemon_avoid_alias(const char *path); +int offset_1st_component(const char *path); /* Read and unpack a sha1 file into memory, write memory to a sha1 file */ extern int sha1_object_info(const unsigned char *, unsigned long *); @@ -759,7 +776,8 @@ const char *show_date_relative(unsigned long time, int tz, size_t timebuf_size); int parse_date(const char *date, char *buf, int bufsize); void datestamp(char *buf, int bufsize); -unsigned long approxidate(const char *); +#define approxidate(s) approxidate_careful((s), NULL) +unsigned long approxidate_careful(const char *, int *); unsigned long approxidate_relative(const char *date, const struct timeval *now); enum date_mode parse_date_format(const char *format); @@ -771,7 +789,7 @@ extern const char *git_committer_info(int); extern const char *fmt_ident(const char *name, const char *email, const char *date_str, int); extern const char *fmt_name(const char *name, const char *email); extern const char *git_editor(void); -extern const char *git_pager(void); +extern const char *git_pager(int stdout_is_tty); struct checkout { const char *base_dir;