From 3125fe528b65c1e4a4f5f934d056af342ab5472d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 16 Aug 2013 16:52:02 +0700 Subject: move setup_alternate_shallow and write_shallow_commits to shallow.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- commit.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'commit.h') diff --git a/commit.h b/commit.h index d912a9d4ac..790e31bec8 100644 --- a/commit.h +++ b/commit.h @@ -198,6 +198,9 @@ 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); +extern int write_shallow_commits(struct strbuf *out, int use_pack_protocol); +extern void setup_alternate_shallow(struct lock_file *shallow_lock, + const char **alternate_shallow_file); int is_descendant_of(struct commit *, struct commit_list *); int in_merge_bases(struct commit *, struct commit *); -- cgit v1.2.3 From 08ea65ad13faaf24f57732cdc8af3d830d4b367f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Fri, 16 Aug 2013 16:52:04 +0700 Subject: shallow: add setup_temporary_shallow() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This function is like setup_alternate_shallow() except that it does not lock $GIT_DIR/shallow. It is supposed to be used when a program generates temporary shallow for use by another program, then throw the shallow file away. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- commit.h | 1 + 1 file changed, 1 insertion(+) (limited to 'commit.h') diff --git a/commit.h b/commit.h index 790e31bec8..c4d324c955 100644 --- a/commit.h +++ b/commit.h @@ -201,6 +201,7 @@ extern void set_alternate_shallow_file(const char *path); extern int write_shallow_commits(struct strbuf *out, int use_pack_protocol); extern void setup_alternate_shallow(struct lock_file *shallow_lock, const char **alternate_shallow_file); +extern char *setup_temporary_shallow(void); int is_descendant_of(struct commit *, struct commit_list *); int in_merge_bases(struct commit *, struct commit *); -- cgit v1.2.3