X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=cache.h;h=0dcd2fe53b6aa7b19d963e130ce5fd4dea2389bc;hb=6e7722e6f88c049f43a1c00c45c502542d1a5752;hp=f14a4ce91aa83c0ed853c6d9fd9a7b6bc2cc12db;hpb=1f40c7c24d999675df818f9d7824937a964f9f40;p=git.git diff --git a/cache.h b/cache.h index f14a4ce9..0dcd2fe5 100644 --- a/cache.h +++ b/cache.h @@ -38,10 +38,9 @@ #define NORETURN __attribute__((__noreturn__)) #else #define NORETURN -#endif - #ifndef __attribute__ -#define __attribute(x) +#define __attribute__(x) +#endif #endif /* @@ -59,7 +58,11 @@ * We accept older names for now but warn. */ extern char *gitenv_bc(const char *); +#ifdef __GNUC__ #define gitenv(e) (getenv(e) ? : gitenv_bc(e)) +#else +#define gitenv(e) (getenv(e) ? getenv(e) : gitenv_bc(e)) +#endif /* * Basic data structures for the directory cache @@ -140,6 +143,10 @@ extern char *get_graft_file(void); #define ALTERNATE_DB_ENVIRONMENT "GIT_ALTERNATE_OBJECT_DIRECTORIES" +extern const char **get_pathspec(const char *prefix, char **pathspec); +extern const char *setup_git_directory(void); +extern char *prefix_path(const char *prefix, int len, char *path); + #define alloc_nr(x) (((x)+16)*3/2) /* Initialize and use the cache information */ @@ -306,6 +313,7 @@ struct ref { struct ref *next; unsigned char old_sha1[20]; unsigned char new_sha1[20]; + unsigned char force; struct ref *peer_ref; /* when renaming */ char name[0]; };