diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-10-15 22:31:47 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-10-15 22:31:47 -0400 |
commit | d55e7c3acf72413563e695a19f7f66efac442064 (patch) | |
tree | b12d163ceb3e56e36a90c82b9c075a3401cd00d3 /commit.c | |
parent | 03618b9df84a0e94e36fdb27060e605e85b956e9 (diff) | |
parent | 8492f00b4f28471af84d3887096257822c4d2bc9 (diff) | |
download | git-d55e7c3acf72413563e695a19f7f66efac442064.tar.gz |
Merge branch 'maint'
* maint:
Whip post 1.5.3.4 maintenance series into shape.
rebase -i: use diff plumbing instead of porcelain
Do not remove distributed configure script
git-archive: document --exec
git-reflog: document --verbose
git-config: handle --file option with relative pathname properly
clear_commit_marks(): avoid deep recursion
git add -i: Remove unused variables
git add -i: Fix parsing of abbreviated hunk headers
git-config: don't silently ignore options after --list
Clean up "git log" format with DIFF_FORMAT_NO_OUTPUT
Fix embarrassing "git log --follow" bug
Conflicts:
RelNotes
git-rebase--interactive.sh
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -441,17 +441,22 @@ struct commit *pop_most_recent_commit(struct commit_list **list, void clear_commit_marks(struct commit *commit, unsigned int mark) { - struct commit_list *parents; + while (commit) { + struct commit_list *parents; - commit->object.flags &= ~mark; - parents = commit->parents; - while (parents) { - struct commit *parent = parents->item; + if (!(mark & commit->object.flags)) + return; - /* Have we already cleared this? */ - if (mark & parent->object.flags) - clear_commit_marks(parent, mark); - parents = parents->next; + commit->object.flags &= ~mark; + + parents = commit->parents; + if (!parents) + return; + + while ((parents = parents->next)) + clear_commit_marks(parents->item, mark); + + commit = commit->parents->item; } } |