diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-04-11 01:46:32 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-11 01:46:32 (GMT) |
commit | 2d5792f0716605ff0059fe4b5c865d6821c0161e (patch) | |
tree | f54d21723cf1216001ec9643f91f0d60136a8643 /commit.c | |
parent | 7547b95b4fbb8591726b1d9381c176cc27fc6aea (diff) | |
parent | efdfe11f4f1f901db1ebfa7ebda6337293a2e5c5 (diff) | |
download | git-2d5792f0716605ff0059fe4b5c865d6821c0161e.zip git-2d5792f0716605ff0059fe4b5c865d6821c0161e.tar.gz git-2d5792f0716605ff0059fe4b5c865d6821c0161e.tar.bz2 |
Merge branch 'bw/c-plus-plus' into ds/lazy-load-trees
* bw/c-plus-plus: (37 commits)
replace: rename 'new' variables
trailer: rename 'template' variables
tempfile: rename 'template' variables
wrapper: rename 'template' variables
environment: rename 'namespace' variables
diff: rename 'template' variables
environment: rename 'template' variables
init-db: rename 'template' variables
unpack-trees: rename 'new' variables
trailer: rename 'new' variables
submodule: rename 'new' variables
split-index: rename 'new' variables
remote: rename 'new' variables
ref-filter: rename 'new' variables
read-cache: rename 'new' variables
line-log: rename 'new' variables
imap-send: rename 'new' variables
http: rename 'new' variables
entry: rename 'new' variables
diffcore-delta: rename 'new' variables
...
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -273,7 +273,7 @@ const void *get_commit_buffer(const struct commit *commit, unsigned long *sizep) oid_to_hex(&commit->object.oid)); if (type != OBJ_COMMIT) die("expected commit for %s, got %s", - oid_to_hex(&commit->object.oid), typename(type)); + oid_to_hex(&commit->object.oid), type_name(type)); if (sizep) *sizep = size; } @@ -862,19 +862,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) |