Skip to content

Commit

Permalink
format-patch: use clear_commit_marks() instead of some ad-hockery
Browse files Browse the repository at this point in the history
It is cleaner, and it describes better what the idea behind the code is.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Jun 27, 2006
1 parent 8780bd8 commit 81db094
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions builtin-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,6 @@ static void reopen_stdout(struct commit *commit, int nr, int keep_subject)
freopen(filename, "w", stdout);
}

static void reset_all_objects_flags()
{
int i;

for (i = 0; i < obj_allocs; i++)
if (objs[i])
objs[i]->flags = 0;
}

static int get_patch_id(struct commit *commit, struct diff_options *options,
unsigned char *sha1)
{
Expand Down Expand Up @@ -220,7 +211,10 @@ static void get_patch_ids(struct rev_info *rev, struct diff_options *options)
}

/* reset for next revision walk */
reset_all_objects_flags();
clear_commit_marks((struct commit *)o1,
SEEN | UNINTERESTING | SHOWN | ADDED);
clear_commit_marks((struct commit *)o2,
SEEN | UNINTERESTING | SHOWN | ADDED);
o1->flags = flags1;
o2->flags = flags2;
}
Expand Down

0 comments on commit 81db094

Please sign in to comment.