Merge branch 'mh/packed-ref-store-prep'
authorJunio C Hamano <gitster@pobox.com>
Tue, 19 Sep 2017 01:47:55 +0000 (10:47 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Sep 2017 01:47:55 +0000 (10:47 +0900)
Fix regression to "gitk --bisect" by a recent update.

* mh/packed-ref-store-prep:
rev-parse: don't trim bisect refnames

1  2 
builtin/rev-parse.c
diff --combined builtin/rev-parse.c
index 2bd28d3c085c9f7f86072bb7e1aae443aee745e6,710e4557d3c8113ad5a47a1be04e215a70890028..9f24004c0a310d22808c86ab6ee65e6b296fe70c
@@@ -4,7 -4,6 +4,7 @@@
   * Copyright (C) Linus Torvalds, 2005
   */
  #include "cache.h"
 +#include "config.h"
  #include "commit.h"
  #include "refs.h"
  #include "quote.h"
@@@ -274,7 -273,7 +274,7 @@@ static int try_difference(const char *a
                return 0;
        }
  
 -      if (!get_sha1_committish(this, oid.hash) && !get_sha1_committish(next, end.hash)) {
 +      if (!get_oid_committish(this, &oid) && !get_oid_committish(next, &end)) {
                show_rev(NORMAL, &end, next);
                show_rev(symmetric ? NORMAL : REVERSED, &oid, this);
                if (symmetric) {
@@@ -328,7 -327,7 +328,7 @@@ static int try_parent_shorthands(const 
                return 0;
  
        *dotdot = 0;
 -      if (get_sha1_committish(arg, oid.hash)) {
 +      if (get_oid_committish(arg, &oid)) {
                *dotdot = '^';
                return 0;
        }
@@@ -702,7 -701,7 +702,7 @@@ int cmd_rev_parse(int argc, const char 
                        }
                        if (!strcmp(arg, "--quiet") || !strcmp(arg, "-q")) {
                                quiet = 1;
 -                              flags |= GET_SHA1_QUIETLY;
 +                              flags |= GET_OID_QUIETLY;
                                continue;
                        }
                        if (opt_with_value(arg, "--short", &arg)) {
                                continue;
                        }
                        if (!strcmp(arg, "--bisect")) {
-                               for_each_ref_in("refs/bisect/bad", show_reference, NULL);
-                               for_each_ref_in("refs/bisect/good", anti_reference, NULL);
+                               for_each_fullref_in("refs/bisect/bad", show_reference, NULL, 0);
+                               for_each_fullref_in("refs/bisect/good", anti_reference, NULL, 0);
                                continue;
                        }
                        if (opt_with_value(arg, "--branches", &arg)) {
                        name++;
                        type = REVERSED;
                }
 -              if (!get_sha1_with_context(name, flags, oid.hash, &unused)) {
 +              if (!get_oid_with_context(name, flags, &oid, &unused)) {
                        if (verify)
                                revs_count++;
                        else