summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-16 06:25:35 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-16 06:25:35 (GMT)
commitfec9ebf16c948bcb4a8b88d0173ee63584bcde76 (patch)
tree2cd39bed392fc4919068219cdb8ee2278a53bf15 /commit.c
parent0620db36f85788193de2102884ff8dd94222660f (diff)
parent8a263aeb4f913e04e18248eb4d370157f1d253e6 (diff)
downloadgit-fec9ebf16c948bcb4a8b88d0173ee63584bcde76.zip
git-fec9ebf16c948bcb4a8b88d0173ee63584bcde76.tar.gz
git-fec9ebf16c948bcb4a8b88d0173ee63584bcde76.tar.bz2
Merge fixes up to GIT 1.1.3
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index 56efc69..b8bf35e 100644
--- a/commit.c
+++ b/commit.c
@@ -359,8 +359,10 @@ void clear_commit_marks(struct commit *commit, unsigned int mark)
parents = commit->parents;
commit->object.flags &= ~mark;
while (parents) {
- if (parents->item && parents->item->object.parsed)
- 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;
}
}