@matheusbsbs / matheus-bagliano / commits / 81db094107
Fork 0

format-patch: use clear_commit_marks() instead of some ad-hockery

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>

Johannes Schindelin committed Jun 27, 2006 at 22:38 UTC 81db094107df9a73a0be4538a74a26115a84dd13
1 file changed +4 -10
builtin-log.c
+4 -10
@@ -160,15 +160,6 @@ static void reopen_stdout(struct commit *commit, int nr, int keep_subject)
160 freopen(filename, "w", stdout);
161 }
162
163 -static void reset_all_objects_flags()
164 -{
165 - int i;
166 -
167 - for (i = 0; i < obj_allocs; i++)
168 - if (objs[i])
169 - objs[i]->flags = 0;
170 -}
171 -
163 static int get_patch_id(struct commit *commit, struct diff_options *options,
164 unsigned char *sha1)
165 {
@@ -220,7 +211,10 @@ static void get_patch_ids(struct rev_info *rev, struct diff_options *options)
211 }
212
213 /* reset for next revision walk */
223 - reset_all_objects_flags();
214 + clear_commit_marks((struct commit *)o1,
215 + SEEN | UNINTERESTING | SHOWN | ADDED);
216 + clear_commit_marks((struct commit *)o2,
217 + SEEN | UNINTERESTING | SHOWN | ADDED);
218 o1->flags = flags1;
219 o2->flags = flags2;
220 }