Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-08 05:52:42 +0300
committerJunio C Hamano <junkio@cox.net>2006-01-08 08:43:01 +0300
commitf8f9c73c7d835ec1e5b665c66623aed49fcd4888 (patch)
tree64fc23b181b3c0e9b5a6edaa8c65a0035c857c63 /commit.c
parent78c2cff61f87d43c1f4ef5a03547f093c4c6e0c9 (diff)
describe: allow more than one revs to be named.
The main loop was prepared to take more than one revs, but the actual naming logic wad not (it used pop_most_recent_commit while forgetting that the commit marks stay after it's done). Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index edd4dedcdd..e9a29caa27 100644
--- a/commit.c
+++ b/commit.c
@@ -352,6 +352,19 @@ struct commit *pop_most_recent_commit(struct commit_list **list,
return ret;
}
+void clear_commit_marks(struct commit *commit, unsigned int mark)
+{
+ struct commit_list *parents;
+
+ parents = commit->parents;
+ commit->object.flags &= ~mark;
+ while (parents) {
+ if (parents->item && parents->item->object.parsed)
+ clear_commit_marks(parents->item, mark);
+ parents = parents->next;
+ }
+}
+
/*
* Generic support for pretty-printing the header
*/