Skip to content

Commit 696a73e

Browse files
committed
SQUASH??? name an array in singular and avoid commenting obvious
1 parent 903ed69 commit 696a73e

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

remote.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,22 +2288,22 @@ static int remote_tracking(struct remote *remote, const char *refname,
22882288
* list during reflog traversals in "check_and_collect_until()".
22892289
*/
22902290
struct reflog_commit_list {
2291-
struct commit **items;
2291+
struct commit **item;
22922292
size_t nr, alloc;
22932293
};
22942294

22952295
/* Append a commit to the list. */
22962296
static void append_commit(struct reflog_commit_list *list,
22972297
struct commit *commit)
22982298
{
2299-
ALLOC_GROW(list->items, list->nr + 1, list->alloc);
2300-
list->items[list->nr++] = commit;
2299+
ALLOC_GROW(list->item, list->nr + 1, list->alloc);
2300+
list->item[list->nr++] = commit;
23012301
}
23022302

23032303
/* Free and reset the list. */
23042304
static void free_reflog_commit_list(struct reflog_commit_list *list)
23052305
{
2306-
FREE_AND_NULL(list->items);
2306+
FREE_AND_NULL(list->item);
23072307
list->nr = list->alloc = 0;
23082308
}
23092309

@@ -2391,14 +2391,8 @@ static int is_reachable_in_reflog(const char *local, const struct ref *remote)
23912391
* Check if the remote commit is reachable from any
23922392
* of the commits in the collected list, in batches.
23932393
*/
2394-
for (chunk = list.items; chunk < list.items + list.nr; chunk += size) {
2395-
size = list.items + list.nr - chunk;
2396-
2397-
/*
2398-
* If the number of remaining entries is more than
2399-
* the batch size, clamp the number of items passed
2400-
* to the maximum batch size.
2401-
*/
2394+
for (chunk = list.item; chunk < list.item + list.nr; chunk += size) {
2395+
size = list.item + list.nr - chunk;
24022396
if (MERGE_BASES_BATCH_SIZE < size)
24032397
size = MERGE_BASES_BATCH_SIZE;
24042398

0 commit comments

Comments
 (0)