Skip to content

Commit

Permalink
string_list_add_one_ref(): rewrite to take an object_id argument
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed May 25, 2015
1 parent 3d79f65 commit fd95035
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions notes.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ int combine_notes_cat_sort_uniq(unsigned char *cur_sha1,
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;
Expand All @@ -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))
Expand Down

0 comments on commit fd95035

Please sign in to comment.