diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2015-05-25 18:38:59 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-25 12:19:34 -0700 |
commit | fd95035fdb817f228b6e5223883dcda081bde546 (patch) | |
tree | fdcd755c432d945cbf226f564c0e921bc3dfb49e /notes.c | |
parent | 3d79f65735bb60b8135f26748c285a877ebb7b69 (diff) | |
download | git-fd95035fdb817f228b6e5223883dcda081bde546.tar.gz |
string_list_add_one_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 'notes.c')
-rw-r--r-- | notes.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -918,7 +918,7 @@ out: return ret; } -static int string_list_add_one_ref(const char *refname, const unsigned char *sha1, +static int string_list_add_one_ref(const char *refname, const struct object_id *oid, int flag, void *cb) { struct string_list *refs = cb; @@ -932,12 +932,9 @@ static int string_list_add_one_ref(const char *refname, const unsigned char *sha */ void string_list_add_refs_by_glob(struct string_list *list, const char *glob) { - struct each_ref_fn_sha1_adapter wrapped_string_list_add_one_ref = - {string_list_add_one_ref, list}; - assert(list->strdup_strings); if (has_glob_specials(glob)) { - for_each_glob_ref(each_ref_fn_adapter, glob, &wrapped_string_list_add_one_ref); + for_each_glob_ref(string_list_add_one_ref, glob, list); } else { unsigned char sha1[20]; if (get_sha1(glob, sha1)) |