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
This commit is contained in:
23
commit.c
23
commit.c
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user