summaryrefslogtreecommitdiff
path: root/builtin-log.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-06-27 20:38:04 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-06-27 23:03:59 (GMT)
commit81db094107df9a73a0be4538a74a26115a84dd13 (patch)
treeb0f323fa4f2fb82be914643867dc86f2066a02ff /builtin-log.c
parent8780bd8fd2fb9a85c39de8d7d3105b94c6a9cf40 (diff)
downloadgit-81db094107df9a73a0be4538a74a26115a84dd13.zip
git-81db094107df9a73a0be4538a74a26115a84dd13.tar.gz
git-81db094107df9a73a0be4538a74a26115a84dd13.tar.bz2
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>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 4ee5891..f9515a8 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -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)
{
@@ -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;
}