revision: remove the unused flag leak_pending
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Dec 25, 2017 at 18:47 UTC
f1230fb5fc77a47fd7964bb3724db352aea4a476
2 files changed
+1
-14
revision.c
+1
-2
@@ -2850,8 +2850,7 @@ int prepare_revision_walk(struct rev_info *revs)
2850
}
2851
}
2852
}
2853
- if (!revs->leak_pending)
2854
- object_array_clear(&old_pending);
2853
+ object_array_clear(&old_pending);
2854
2855
/* Signal whether we need per-parent treesame decoration */
2856
if (revs->simplify_merges ||
revision.h
-12
@@ -150,18 +150,6 @@ struct rev_info {
150
date_mode_explicit:1,
151
preserve_subject:1;
152
unsigned int disable_stdin:1;
153
- /*
154
- * Set `leak_pending` to prevent `prepare_revision_walk()` from clearing
155
- * the array of pending objects (`pending`). It will still forget about
156
- * the array and its entries, so they really are leaked. This can be
157
- * useful if the `struct object_array` `pending` is copied before
158
- * calling `prepare_revision_walk()`. By setting `leak_pending`, you
159
- * effectively claim ownership of the old array, so you should most
160
- * likely call `object_array_clear(&pending_copy)` once you are done.
161
- * Observe that this is about ownership of the array and its entries,
162
- * not the commits referenced by those entries.
163
- */
164
- unsigned int leak_pending:1;
153
/* --show-linear-break */
154
unsigned int track_linear:1,
155
track_first_time:1,