summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-05-26 08:16:15 +0700
committerJunio C Hamano <gitster@pobox.com>2013-05-28 08:06:08 -0700
commit6035d6aad8ca11954c0d7821f6f3e7c047039c8f (patch)
treea24924b1323fe52278be3f912b36bc78eed7be22 /commit.h
parent0781aa4766ed88d620ea060c7d775ca806ebfa93 (diff)
downloadgit-6035d6aad8ca11954c0d7821f6f3e7c047039c8f.tar.gz
fetch-pack: prepare updated shallow file before fetching the pack
index-pack --strict looks up and follows parent commits. If shallow information is not ready by the time index-pack is run, index-pack may be led to non-existent objects. Make fetch-pack save shallow file to disk before invoking index-pack. git learns new global option --shallow-file to pass on the alternate shallow file path. Undocumented (and not even support --shallow-file= syntax) because it's unlikely to be used again elsewhere. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index 67bd5091be..6e9c7cd9d5 100644
--- a/commit.h
+++ b/commit.h
@@ -176,6 +176,8 @@ 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 is_descendant_of(struct commit *, struct commit_list *);
int in_merge_bases(struct commit *, struct commit *);