diff options
author | Junio C Hamano <junkio@cox.net> | 2006-07-03 03:05:20 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-03 03:05:20 -0700 |
commit | 160b7983034cdd24ea1bf6ef7a2532a2296461c6 (patch) | |
tree | 26b69d312d4f19be852e8578fb6d0bf669cd7790 /commit.c | |
parent | 2ef108013ec15e8d5feee6d5c42692ae956ee302 (diff) | |
download | git-160b7983034cdd24ea1bf6ef7a2532a2296461c6.tar.gz |
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 'commit.c')
-rw-r--r-- | commit.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -397,12 +397,13 @@ void clear_commit_marks(struct commit *commit, unsigned int mark) { struct commit_list *parents; - if (!commit) - return; parents = commit->parents; commit->object.flags &= ~mark; while (parents) { - clear_commit_marks(parents->item, mark); + struct commit *parent = parents->item; + if (parent && parent->object.parsed && + (parent->object.flags & mark)) + clear_commit_marks(parent, mark); parents = parents->next; } } @@ -1082,10 +1083,8 @@ struct commit_list *get_merge_bases(struct commit *rev1, struct commit *rev2, } finish: - if (cleanup) { - clear_commit_marks(rev1, PARENT1 | PARENT2 | STALE); - clear_commit_marks(rev2, PARENT1 | PARENT2 | STALE); - } + if (cleanup) + clear_object_marks(PARENT1 | PARENT2 | STALE); return result; } |