summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-02-14 18:59:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-22 18:08:05 (GMT)
commit258c03eb4518c679dd1d5e49b24416ea179c1688 (patch)
tree007c79ec00d1558a4473a49911b18d44c0f446d1 /commit.c
parent06fffa000c3c3ab54f975474d5bb8d30dc914c03 (diff)
downloadgit-258c03eb4518c679dd1d5e49b24416ea179c1688.zip
git-258c03eb4518c679dd1d5e49b24416ea179c1688.tar.gz
git-258c03eb4518c679dd1d5e49b24416ea179c1688.tar.bz2
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>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/commit.c b/commit.c
index cd9ace1..874b6e5 100644
--- a/commit.c
+++ b/commit.c
@@ -861,19 +861,19 @@ struct commit_list *get_octopus_merge_bases(struct commit_list *in)
commit_list_insert(in->item, &ret);
for (i = in->next; i; i = i->next) {
- struct commit_list *new = NULL, *end = NULL;
+ struct commit_list *new_commits = NULL, *end = NULL;
for (j = ret; j; j = j->next) {
struct commit_list *bases;
bases = get_merge_bases(i->item, j->item);
- if (!new)
- new = bases;
+ if (!new_commits)
+ new_commits = bases;
else
end->next = bases;
for (k = bases; k; k = k->next)
end = k;
}
- ret = new;
+ ret = new_commits;
}
return ret;
}
@@ -1617,11 +1617,11 @@ struct commit *get_merge_parent(const char *name)
struct commit_list **commit_list_append(struct commit *commit,
struct commit_list **next)
{
- struct commit_list *new = xmalloc(sizeof(struct commit_list));
- new->item = commit;
- *next = new;
- new->next = NULL;
- return &new->next;
+ struct commit_list *new_commit = xmalloc(sizeof(struct commit_list));
+ new_commit->item = commit;
+ *next = new_commit;
+ new_commit->next = NULL;
+ return &new_commit->next;
}
const char *find_commit_header(const char *msg, const char *key, size_t *out_len)