summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/commit.h b/commit.h
index 5cc1e7e..9a1fa96 100644
--- a/commit.h
+++ b/commit.h
@@ -59,7 +59,11 @@ struct commit *lookup_commit_reference_by_name(const char *name);
struct commit *lookup_commit_or_die(const unsigned char *sha1, const char *ref_name);
int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long size);
-int parse_commit(struct commit *item);
+int parse_commit_gently(struct commit *item, int quiet_on_missing);
+static inline int parse_commit(struct commit *item)
+{
+ return parse_commit_gently(item, 0);
+}
void parse_commit_or_die(struct commit *item);
/*
@@ -226,9 +230,9 @@ enum rev_sort_order {
void sort_in_topological_order(struct commit_list **, enum rev_sort_order);
struct commit_graft {
- unsigned char sha1[20];
+ struct object_id oid;
int nr_parent; /* < 0 if shallow commit */
- unsigned char parent[FLEX_ARRAY][20]; /* more */
+ struct object_id parent[FLEX_ARRAY]; /* more */
};
typedef int (*each_commit_graft_fn)(const struct commit_graft *, void *);
@@ -254,7 +258,6 @@ extern int for_each_commit_graft(each_commit_graft_fn, void *);
extern int is_repository_shallow(void);
extern struct commit_list *get_shallow_commits(struct object_array *heads,
int depth, int shallow_flag, int not_shallow_flag);
-extern void check_shallow_file_for_update(void);
extern void set_alternate_shallow_file(const char *path, int override);
extern int write_shallow_commits(struct strbuf *out, int use_pack_protocol,
const struct sha1_array *extra);