builtin/describe.c: rename `oid` to avoid variable shadowing

The function `describe` has already a variable named `oid` declared at the beginning of the function for an object id. Do not shadow that variable with a pointer to an object id. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Nov 15, 2017 at 18:00 UTC c87b653c46c4455561642b14efc8920a0b3e44b9
1 file changed +4 -4
builtin/describe.c
+4 -4
@@ -381,9 +381,9 @@ static void describe(const char *arg, int last_one)
381 }
382
383 if (!match_cnt) {
384 - struct object_id *oid = &cmit->object.oid;
384 + struct object_id *cmit_oid = &cmit->object.oid;
385 if (always) {
386 - printf("%s", find_unique_abbrev(oid->hash, abbrev));
386 + printf("%s", find_unique_abbrev(cmit_oid->hash, abbrev));
387 if (suffix)
388 printf("%s", suffix);
389 printf("\n");
@@ -392,11 +392,11 @@ static void describe(const char *arg, int last_one)
392 if (unannotated_cnt)
393 die(_("No annotated tags can describe '%s'.\n"
394 "However, there were unannotated tags: try --tags."),
395 - oid_to_hex(oid));
395 + oid_to_hex(cmit_oid));
396 else
397 die(_("No tags can describe '%s'.\n"
398 "Try --always, or create some tags."),
399 - oid_to_hex(oid));
399 + oid_to_hex(cmit_oid));
400 }
401
402 QSORT(all_matches, match_cnt, compare_pt);