diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-01-23 13:16:36 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-01-23 13:16:36 -0800 |
| commit | 0bbab7d2ab61b6aad217706e0879db561e1bdfae (patch) | |
| tree | 63ab2b5c82ce25fcccb8ef3e0a451d87a47a33bf /object.c | |
| parent | Merge branch 'jm/svn-pushmergeinfo-fix' (diff) | |
| parent | commit: remove unused function clear_commit_marks_for_object_array() (diff) | |
| download | git-0bbab7d2ab61b6aad217706e0879db561e1bdfae.tar.gz git-0bbab7d2ab61b6aad217706e0879db561e1bdfae.zip | |
Merge branch 'rs/lose-leak-pending'
API clean-up around revision traversal.
* rs/lose-leak-pending:
commit: remove unused function clear_commit_marks_for_object_array()
revision: remove the unused flag leak_pending
checkout: avoid using the rev_info flag leak_pending
bundle: avoid using the rev_info flag leak_pending
bisect: avoid using the rev_info flag leak_pending
object: add clear_commit_marks_all()
ref-filter: use clear_commit_marks_many() in do_merge_filter()
commit: use clear_commit_marks_many() in remove_redundant()
commit: avoid allocation in clear_commit_marks_many()
Diffstat (limited to 'object.c')
| -rw-r--r-- | object.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -434,3 +434,14 @@ void clear_object_flags(unsigned flags) obj->flags &= ~flags; } } + +void clear_commit_marks_all(unsigned int flags) +{ + int i; + + for (i = 0; i < obj_hash_size; i++) { + struct object *obj = obj_hash[i]; + if (obj && obj->type == OBJ_COMMIT) + obj->flags &= ~flags; + } +} |
