projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix git-log-script when HEAD is invalid.
[git.git]
/
cache.h
diff --git
a/cache.h
b/cache.h
index
efd2a2c
..
0dcd2fe
100644
(file)
--- a/
cache.h
+++ b/
cache.h
@@
-38,10
+38,9
@@
#define NORETURN __attribute__((__noreturn__))
#else
#define NORETURN
#define NORETURN __attribute__((__noreturn__))
#else
#define NORETURN
-#endif
-
#ifndef __attribute__
#ifndef __attribute__
-#define __attribute(x)
+#define __attribute__(x)
+#endif
#endif
/*
#endif
/*
@@
-59,7
+58,11
@@
* We accept older names for now but warn.
*/
extern char *gitenv_bc(const char *);
* We accept older names for now but warn.
*/
extern char *gitenv_bc(const char *);
+#ifdef __GNUC__
#define gitenv(e) (getenv(e) ? : gitenv_bc(e))
#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
/*
* 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"
#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 */
#define alloc_nr(x) (((x)+16)*3/2)
/* Initialize and use the cache information */
@@
-278,9
+285,10
@@
struct checkout {
extern int checkout_entry(struct cache_entry *ce, struct checkout *state);
extern struct alternate_object_database {
extern int checkout_entry(struct cache_entry *ce, struct checkout *state);
extern struct alternate_object_database {
-
char *base
;
+
struct alternate_object_database *next
;
char *name;
char *name;
-} *alt_odb;
+ char base[0]; /* more */
+} *alt_odb_list;
extern void prepare_alt_odb(void);
extern struct packed_git {
extern void prepare_alt_odb(void);
extern struct packed_git {
@@
-305,6
+313,7
@@
struct ref {
struct ref *next;
unsigned char old_sha1[20];
unsigned char new_sha1[20];
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];
};
struct ref *peer_ref; /* when renaming */
char name[0];
};
@@
-318,6
+327,8
@@
extern int get_ack(int fd, unsigned char *result_sha1);
extern struct ref **get_remote_heads(int in, struct ref **list, int nr_match, char **match);
extern struct packed_git *parse_pack_index(unsigned char *sha1);
extern struct ref **get_remote_heads(int in, struct ref **list, int nr_match, char **match);
extern struct packed_git *parse_pack_index(unsigned char *sha1);
+extern struct packed_git *parse_pack_index_file(unsigned char *sha1,
+ char *idx_path);
extern void prepare_packed_git(void);
extern void install_packed_git(struct packed_git *pack);
extern void prepare_packed_git(void);
extern void install_packed_git(struct packed_git *pack);