From 26c3177ee41897af984fac9148763131562accf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 1 Oct 2011 17:43:52 +0200 Subject: revision: factor out add_pending_sha1 This function is a combination of the static get_reference and add_pending_object. It can be used to easily queue objects by hash. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- revision.h | 1 + 1 file changed, 1 insertion(+) (limited to 'revision.h') diff --git a/revision.h b/revision.h index 3d64adad1..45412656d 100644 --- a/revision.h +++ b/revision.h @@ -191,6 +191,7 @@ extern void add_object(struct object *obj, const char *name); extern void add_pending_object(struct rev_info *revs, struct object *obj, const char *name); +extern void add_pending_sha1(struct rev_info *revs, const char *name, const unsigned char *sha1, unsigned int flags); extern void add_head_to_pending(struct rev_info *); -- cgit v1.2.1 From 4a43d374fcbdea26b3596592a497a1c16f90b9e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 1 Oct 2011 17:56:08 +0200 Subject: revision: add leak_pending flag The new flag leak_pending in struct rev_info can be used to prevent prepare_revision_walk from freeing the list of pending objects. It will still forget about them, so it really is leaked. This behaviour may look weird at first, but it can be useful if the pointer to the list is saved before calling prepare_revision_walk. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- revision.h | 1 + 1 file changed, 1 insertion(+) (limited to 'revision.h') diff --git a/revision.h b/revision.h index 45412656d..366a9b49b 100644 --- a/revision.h +++ b/revision.h @@ -97,6 +97,7 @@ struct rev_info { date_mode_explicit:1, preserve_subject:1; unsigned int disable_stdin:1; + unsigned int leak_pending:1; enum date_mode date_mode; -- cgit v1.2.1