diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2015-05-25 18:38:33 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-25 12:19:28 -0700 |
commit | fcb615f51f303177a8454e988f8e8ef9fb3e94d9 (patch) | |
tree | 7e316af5669fa315200f2cbce3700bd991aea3f5 /builtin | |
parent | a55ce971857c5fcaf9d390c826de6a0e5c6a74eb (diff) | |
download | git-fcb615f51f303177a8454e988f8e8ef9fb3e94d9.tar.gz git-fcb615f51f303177a8454e988f8e8ef9fb3e94d9.tar.xz |
add_pending_uninteresting_ref(): rewrite to take an object_id argument
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/checkout.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 9416aa245..9b49f0e41 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -702,10 +702,10 @@ static void update_refs_for_switch(const struct checkout_opts *opts, } static int add_pending_uninteresting_ref(const char *refname, - const unsigned char *sha1, + const struct object_id *oid, int flags, void *cb_data) { - add_pending_sha1(cb_data, refname, sha1, UNINTERESTING); + add_pending_sha1(cb_data, refname, oid->hash, UNINTERESTING); return 0; } @@ -784,8 +784,6 @@ static void orphaned_commit_warning(struct commit *old, struct commit *new) struct rev_info revs; struct object *object = &old->object; struct object_array refs; - struct each_ref_fn_sha1_adapter wrapped_add_pending_uninteresting_ref = - {add_pending_uninteresting_ref, &revs}; init_revisions(&revs, NULL); setup_revisions(0, NULL, &revs, NULL); @@ -793,7 +791,7 @@ static void orphaned_commit_warning(struct commit *old, struct commit *new) object->flags &= ~UNINTERESTING; add_pending_object(&revs, object, sha1_to_hex(object->sha1)); - for_each_ref(each_ref_fn_adapter, &wrapped_add_pending_uninteresting_ref); + for_each_ref(add_pending_uninteresting_ref, &revs); add_pending_sha1(&revs, "HEAD", new->object.sha1, UNINTERESTING); refs = revs.pending; |