summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 78c2cff)
raw | patch | inline | side by side (parent: 78c2cff)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 8 Jan 2006 02:52:42 +0000 (18:52 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 8 Jan 2006 05:43:01 +0000 (21:43 -0800) |
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>
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>
commit.c | patch | blob | history | |
commit.h | patch | blob | history | |
describe.c | patch | blob | history |
diff --git a/commit.c b/commit.c
index edd4dedcdd13c2c3fd02714ef282b173f7cec7fe..e9a29caa27fbdd94810abbc4fd9c44e06c81265c 100644 (file)
--- a/commit.c
+++ b/commit.c
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
*/
diff --git a/commit.h b/commit.h
index 6738a696d7d7861188873cf7f7279bc8c19545d5..9c4a244bd90cd96a461a6d6774106b0e6a11fe1e 100644 (file)
--- a/commit.h
+++ b/commit.h
struct commit *pop_commit(struct commit_list **stack);
+void clear_commit_marks(struct commit *commit, unsigned int mark);
+
int count_parents(struct commit * commit);
/*
diff --git a/describe.c b/describe.c
index 84d96b5b82bf5d1b688da39208077df5ca6ef6d9..00fa02adccda98998fcaa8feb733a71dedfee55f 100644 (file)
--- a/describe.c
+++ b/describe.c
if (n) {
printf("%s-g%s\n", n->path,
find_unique_abbrev(cmit->object.sha1, abbrev));
- return;
+ break;
}
}
+ clear_commit_marks(cmit, SEEN);
}
int main(int argc, char **argv)