commit: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Williams committed Feb 14, 2018 at 10:59 UTC 258c03eb4518c679dd1d5e49b24416ea179c1688
1 file changed +9 -9
commit.c
+9 -9
@@ -861,19 +861,19 @@ struct commit_list *get_octopus_merge_bases(struct commit_list *in)
861 commit_list_insert(in->item, &ret);
862
863 for (i = in->next; i; i = i->next) {
864 - struct commit_list *new = NULL, *end = NULL;
864 + struct commit_list *new_commits = NULL, *end = NULL;
865
866 for (j = ret; j; j = j->next) {
867 struct commit_list *bases;
868 bases = get_merge_bases(i->item, j->item);
869 - if (!new)
870 - new = bases;
869 + if (!new_commits)
870 + new_commits = bases;
871 else
872 end->next = bases;
873 for (k = bases; k; k = k->next)
874 end = k;
875 }
876 - ret = new;
876 + ret = new_commits;
877 }
878 return ret;
879 }
@@ -1617,11 +1617,11 @@ struct commit *get_merge_parent(const char *name)
1617 struct commit_list **commit_list_append(struct commit *commit,
1618 struct commit_list **next)
1619 {
1620 - struct commit_list *new = xmalloc(sizeof(struct commit_list));
1621 - new->item = commit;
1622 - *next = new;
1623 - new->next = NULL;
1624 - return &new->next;
1620 + struct commit_list *new_commit = xmalloc(sizeof(struct commit_list));
1621 + new_commit->item = commit;
1622 + *next = new_commit;
1623 + new_commit->next = NULL;
1624 + return &new_commit->next;
1625 }
1626
1627 const char *find_commit_header(const char *msg, const char *key, size_t *out_len)