]> granicus.if.org Git - git/commitdiff
Merge branch 'bc/object-id'
authorJunio C Hamano <gitster@pobox.com>
Mon, 6 Nov 2017 05:24:27 +0000 (14:24 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Nov 2017 05:24:27 +0000 (14:24 +0900)
Conversion from uchar[20] to struct object_id continues.

* bc/object-id: (25 commits)
  refs/files-backend: convert static functions to object_id
  refs: convert read_raw_ref backends to struct object_id
  refs: convert peel_object to struct object_id
  refs: convert resolve_ref_unsafe to struct object_id
  worktree: convert struct worktree to object_id
  refs: convert resolve_gitlink_ref to struct object_id
  Convert remaining callers of resolve_gitlink_ref to object_id
  sha1_file: convert index_path and index_fd to struct object_id
  refs: convert reflog_expire parameter to struct object_id
  refs: convert read_ref_at to struct object_id
  refs: convert peel_ref to struct object_id
  builtin/pack-objects: convert to struct object_id
  pack-bitmap: convert traverse_bitmap_commit_list to object_id
  refs: convert dwim_log to struct object_id
  builtin/reflog: convert remaining unsigned char uses to object_id
  refs: convert dwim_ref and expand_ref to struct object_id
  refs: convert read_ref and read_ref_full to object_id
  refs: convert resolve_refdup and refs_resolve_refdup to struct object_id
  Convert check_connected to use struct object_id
  refs: update ref transactions to use struct object_id
  ...

21 files changed:
1  2 
bisect.c
builtin/am.c
builtin/branch.c
builtin/checkout.c
builtin/clone.c
builtin/commit.c
builtin/describe.c
builtin/pull.c
builtin/remote.c
builtin/show-branch.c
builtin/submodule--helper.c
builtin/tag.c
dir.c
read-cache.c
refs/files-backend.c
sequencer.c
sha1_file.c
sha1_name.c
t/helper/test-ref-store.c
worktree.c
wt-status.c

diff --cc bisect.c
Simple merge
diff --cc builtin/am.c
Simple merge
Simple merge
index fcff0de198edb05ca58ab538e12aa77371425e17,463a337e5d1489db5f2ca01c525cbd19dda7f578..6c2b4cd419a4a588e73a3f12a9ebdd6c1365ce78
@@@ -374,10 -376,10 +374,10 @@@ static int checkout_paths(const struct 
        }
        errs |= finish_delayed_checkout(&state);
  
 -      if (write_locked_index(&the_index, lock_file, COMMIT_LOCK))
 +      if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
                die(_("unable to write new index file"));
  
-       read_ref_full("HEAD", 0, rev.hash, NULL);
+       read_ref_full("HEAD", 0, &rev, NULL);
        head = lookup_commit_reference_gently(&rev, 1);
  
        errs |= post_checkout_hook(head, head, 0);
diff --cc builtin/clone.c
Simple merge
Simple merge
Simple merge
diff --cc builtin/pull.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc builtin/tag.c
Simple merge
diff --cc dir.c
index 9987011da57bcf171ba645788b8ccd2151561e5c,f09a31e102232b2c138358585b00635a40227c6e..fc2bdc79fc8ff599c8fba922dd7407cacae0c730
--- 1/dir.c
--- 2/dir.c
+++ b/dir.c
@@@ -1390,9 -1390,9 +1390,9 @@@ static enum path_treatment treat_direct
                if (dir->flags & DIR_SHOW_OTHER_DIRECTORIES)
                        break;
                if (!(dir->flags & DIR_NO_GITLINKS)) {
-                       unsigned char sha1[20];
-                       if (resolve_gitlink_ref(dirname, "HEAD", sha1) == 0)
+                       struct object_id oid;
+                       if (resolve_gitlink_ref(dirname, "HEAD", &oid) == 0)
 -                              return path_untracked;
 +                              return exclude ? path_excluded : path_untracked;
                }
                return path_recurse;
        }
diff --cc read-cache.c
Simple merge
Simple merge
diff --cc sequencer.c
Simple merge
diff --cc sha1_file.c
Simple merge
diff --cc sha1_name.c
Simple merge
index 6ec2670044d205533594947547fce8255de5aa4c,d846c88ed26fb985af3cb6c9c03ec978069063a4..7120634b04733bb8abe1f0622f0e1e9c8280b643
@@@ -134,8 -134,8 +134,8 @@@ static int cmd_resolve_ref(struct ref_s
        const char *ref;
  
        ref = refs_resolve_ref_unsafe(refs, refname, resolve_flags,
-                                     sha1, &flags);
-       printf("%s %s 0x%x\n", sha1_to_hex(sha1), ref ? ref : "(null)", flags);
+                                     &oid, &flags);
 -      printf("%s %s 0x%x\n", oid_to_hex(&oid), ref, flags);
++      printf("%s %s 0x%x\n", oid_to_hex(&oid), ref ? ref : "(null)", flags);
        return ref ? 0 : 1;
  }
  
diff --cc worktree.c
Simple merge
diff --cc wt-status.c
Simple merge