rev-parse: rename 'this' variable

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 ae90bdce8f828348146a55eef863d8b594e0997c
1 file changed +17 -17
builtin/rev-parse.c
+17 -17
@@ -243,28 +243,28 @@ static int show_file(const char *arg, int output_prefix)
243 static int try_difference(const char *arg)
244 {
245 char *dotdot;
246 - struct object_id oid;
247 - struct object_id end;
248 - const char *next;
249 - const char *this;
246 + struct object_id start_oid;
247 + struct object_id end_oid;
248 + const char *end;
249 + const char *start;
250 int symmetric;
251 static const char head_by_default[] = "HEAD";
252
253 if (!(dotdot = strstr(arg, "..")))
254 return 0;
255 - next = dotdot + 2;
256 - this = arg;
257 - symmetric = (*next == '.');
255 + end = dotdot + 2;
256 + start = arg;
257 + symmetric = (*end == '.');
258
259 *dotdot = 0;
260 - next += symmetric;
260 + end += symmetric;
261
262 - if (!*next)
263 - next = head_by_default;
262 + if (!*end)
263 + end = head_by_default;
264 if (dotdot == arg)
265 - this = head_by_default;
265 + start = head_by_default;
266
267 - if (this == head_by_default && next == head_by_default &&
267 + if (start == head_by_default && end == head_by_default &&
268 !symmetric) {
269 /*
270 * Just ".."? That is not a range but the
@@ -274,14 +274,14 @@ static int try_difference(const char *arg)
274 return 0;
275 }
276
277 - if (!get_oid_committish(this, &oid) && !get_oid_committish(next, &end)) {
278 - show_rev(NORMAL, &end, next);
279 - show_rev(symmetric ? NORMAL : REVERSED, &oid, this);
277 + if (!get_oid_committish(start, &start_oid) && !get_oid_committish(end, &end_oid)) {
278 + show_rev(NORMAL, &end_oid, end);
279 + show_rev(symmetric ? NORMAL : REVERSED, &start_oid, start);
280 if (symmetric) {
281 struct commit_list *exclude;
282 struct commit *a, *b;
283 - a = lookup_commit_reference(&oid);
284 - b = lookup_commit_reference(&end);
283 + a = lookup_commit_reference(&start_oid);
284 + b = lookup_commit_reference(&end_oid);
285 exclude = get_merge_bases(a, b);
286 while (exclude) {
287 struct commit *commit = pop_commit(&exclude);