summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d938fc)
raw | patch | inline | side by side (parent: 2d938fc)
author | Christian Couder <chriscool@tuxfamily.org> | |
Wed, 27 May 2009 05:09:40 +0000 (07:09 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 27 May 2009 20:45:45 +0000 (13:45 -0700) |
The goal of this patch series is to check if good revisions are
ancestor of the bad revision without forking a process to launch
"git rev-list $good ^$bad".
This new version of this patch series does not use an "unparse_commit"
function anymore, we use "clear_commit_marks" instead.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ancestor of the bad revision without forking a process to launch
"git rev-list $good ^$bad".
This new version of this patch series does not use an "unparse_commit"
function anymore, we use "clear_commit_marks" instead.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bisect.c | patch | blob | history | |
commit.c | patch | blob | history | |
commit.h | patch | blob | history |
diff --git a/bisect.c b/bisect.c
index c43c120bdefe95bda60b913c5a52d0a942e9d3f6..18f9fa406244e10893a7f328b942a723f9fa445f 100644 (file)
--- a/bisect.c
+++ b/bisect.c
/* Clean up objects used, as they will be reused. */
for (i = 0; i < pending_copy.nr; i++) {
struct object *o = pending_copy.objects[i].item;
- unparse_commit((struct commit *)o);
+ clear_commit_marks((struct commit *)o, ALL_REV_FLAGS);
}
return res;
diff --git a/commit.c b/commit.c
index 8f6b703c557599921d890c3b50b66eaa397de548..aa3b35b6a86891ac9d0628e20a6a46d506bf7700 100644 (file)
--- a/commit.c
+++ b/commit.c
return ret;
}
-static void unparse_commit_list(struct commit_list *list)
-{
- for (; list; list = list->next)
- unparse_commit(list->item);
-}
-
-void unparse_commit(struct commit *item)
-{
- item->object.flags = 0;
- item->object.used = 0;
- if (item->object.parsed) {
- item->object.parsed = 0;
- if (item->parents) {
- unparse_commit_list(item->parents);
- free_commit_list(item->parents);
- item->parents = NULL;
- }
- }
-}
-
struct commit_list *commit_list_insert(struct commit *item, struct commit_list **list_p)
{
struct commit_list *new_list = xmalloc(sizeof(struct commit_list));
diff --git a/commit.h b/commit.h
index f3eaf1d048a3e799eb571fbfe1302c08b3d394a6..ba9f63813eba004ae409eba8741266a074161239 100644 (file)
--- a/commit.h
+++ b/commit.h
int parse_commit(struct commit *item);
-void unparse_commit(struct commit *item);
-
struct commit_list * commit_list_insert(struct commit *item, struct commit_list **list_p);
unsigned commit_list_count(const struct commit_list *l);
struct commit_list * insert_by_date(struct commit *item, struct commit_list **list);