summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-07-03 03:05:20 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-07-03 03:05:20 -0700
commit160b7983034cdd24ea1bf6ef7a2532a2296461c6 (patch)
tree26b69d312d4f19be852e8578fb6d0bf669cd7790 /object.c
parentget_merge_bases: clean up even when there is no common commit. (diff)
downloadtgif-160b7983034cdd24ea1bf6ef7a2532a2296461c6.tar.xz
revert clear-commit-marks for now.
Earlier change broke "git describe A B" among other things. Revert it for now, and clean the commits smudged by get_merge_bases using clear_object_marks() function. For complex commit ancestry graph, this is way cheaper as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'object.c')
-rw-r--r--object.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/object.c b/object.c
index 37784cee9a..9caba4fac8 100644
--- a/object.c
+++ b/object.c
@@ -217,3 +217,12 @@ void add_object_array(struct object *obj, const char *name, struct object_array
objects[nr].name = name;
array->nr = ++nr;
}
+
+void clear_object_marks(unsigned mark)
+{
+ int i;
+
+ for (i = 0; i < obj_allocs; i++)
+ if (objs[i])
+ objs[i]->flags &= ~mark;
+}