Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
rev-parse: rename 'this' variable
author
Brandon Williams
<bmwill@google.com>
Wed, 14 Feb 2018 18:59:27 +0000
(10:59 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 14 Feb 2018 21:10:06 +0000
(13:10 -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>
builtin/rev-parse.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
095b3b2
)
diff --git
a/builtin/rev-parse.c
b/builtin/rev-parse.c
index 74aa644cbb37b5741c521eba53d0a040aaf1582e..171c7a2b42446dfec93be7d4f416ec762fa858c4 100644
(file)
--- a/
builtin/rev-parse.c
+++ b/
builtin/rev-parse.c
@@
-243,28
+243,28
@@
static int show_file(const char *arg, int output_prefix)
static int try_difference(const char *arg)
{
char *dotdot;
static int try_difference(const char *arg)
{
char *dotdot;
- struct object_id oid;
- struct object_id end;
- const char *
next
;
- const char *
this
;
+ struct object_id
start_
oid;
+ struct object_id end
_oid
;
+ const char *
end
;
+ const char *
start
;
int symmetric;
static const char head_by_default[] = "HEAD";
if (!(dotdot = strstr(arg, "..")))
return 0;
int symmetric;
static const char head_by_default[] = "HEAD";
if (!(dotdot = strstr(arg, "..")))
return 0;
-
next
= dotdot + 2;
-
this
= arg;
- symmetric = (*
next
== '.');
+
end
= dotdot + 2;
+
start
= arg;
+ symmetric = (*
end
== '.');
*dotdot = 0;
*dotdot = 0;
-
next
+= symmetric;
+
end
+= symmetric;
- if (!*
next
)
-
next
= head_by_default;
+ if (!*
end
)
+
end
= head_by_default;
if (dotdot == arg)
if (dotdot == arg)
-
this
= head_by_default;
+
start
= head_by_default;
- if (
this == head_by_default && next
== head_by_default &&
+ if (
start == head_by_default && end
== head_by_default &&
!symmetric) {
/*
* Just ".."? That is not a range but the
!symmetric) {
/*
* Just ".."? That is not a range but the
@@
-274,14
+274,14
@@
static int try_difference(const char *arg)
return 0;
}
return 0;
}
- if (!get_oid_committish(
this, &oid) && !get_oid_committish(next, &en
d)) {
- show_rev(NORMAL, &end
, next
);
- show_rev(symmetric ? NORMAL : REVERSED, &
oid, this
);
+ if (!get_oid_committish(
start, &start_oid) && !get_oid_committish(end, &end_oi
d)) {
+ show_rev(NORMAL, &end
_oid, end
);
+ show_rev(symmetric ? NORMAL : REVERSED, &
start_oid, start
);
if (symmetric) {
struct commit_list *exclude;
struct commit *a, *b;
if (symmetric) {
struct commit_list *exclude;
struct commit *a, *b;
- a = lookup_commit_reference(&oid);
- b = lookup_commit_reference(&end);
+ a = lookup_commit_reference(&
start_
oid);
+ b = lookup_commit_reference(&end
_oid
);
exclude = get_merge_bases(a, b);
while (exclude) {
struct commit *commit = pop_commit(&exclude);
exclude = get_merge_bases(a, b);
while (exclude) {
struct commit *commit = pop_commit(&exclude);