Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
remote: rename 'new' variables
author
Brandon Williams
<bmwill@google.com>
Wed, 14 Feb 2018 18:59:47 +0000
(10:59 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 22 Feb 2018 18:08:05 +0000
(10:08 -0800)
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>
remote.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
1472b5b
)
diff --git
a/remote.c
b/remote.c
index 4e93753e1988afd4a01559951f96142c6dc2e73d..2922dca07cfe1a2091f71e72da709dc342660784 100644
(file)
--- a/
remote.c
+++ b/
remote.c
@@
-1970,33
+1970,33
@@
static void unmark_and_free(struct commit_list *list, unsigned int mark)
int ref_newer(const struct object_id *new_oid, const struct object_id *old_oid)
{
struct object *o;
int ref_newer(const struct object_id *new_oid, const struct object_id *old_oid)
{
struct object *o;
- struct commit *old
, *new
;
+ struct commit *old
_commit, *new_commit
;
struct commit_list *list, *used;
int found = 0;
/*
struct commit_list *list, *used;
int found = 0;
/*
- * Both new
and old must be commit-ish and new
is descendant of
- * old. Otherwise we require --force.
+ * Both new
_commit and old_commit must be commit-ish and new_commit
is descendant of
+ * old
_commit
. Otherwise we require --force.
*/
o = deref_tag(parse_object(old_oid), NULL, 0);
if (!o || o->type != OBJ_COMMIT)
return 0;
*/
o = deref_tag(parse_object(old_oid), NULL, 0);
if (!o || o->type != OBJ_COMMIT)
return 0;
- old = (struct commit *) o;
+ old
_commit
= (struct commit *) o;
o = deref_tag(parse_object(new_oid), NULL, 0);
if (!o || o->type != OBJ_COMMIT)
return 0;
o = deref_tag(parse_object(new_oid), NULL, 0);
if (!o || o->type != OBJ_COMMIT)
return 0;
- new = (struct commit *) o;
+ new
_commit
= (struct commit *) o;
- if (parse_commit(new) < 0)
+ if (parse_commit(new
_commit
) < 0)
return 0;
used = list = NULL;
return 0;
used = list = NULL;
- commit_list_insert(new, &list);
+ commit_list_insert(new
_commit
, &list);
while (list) {
while (list) {
- new = pop_most_recent_commit(&list, TMP_MARK);
- commit_list_insert(new, &used);
- if (new
== old
) {
+ new
_commit
= pop_most_recent_commit(&list, TMP_MARK);
+ commit_list_insert(new
_commit
, &used);
+ if (new
_commit == old_commit
) {
found = 1;
break;
}
found = 1;
break;
}