aboutsummaryrefslogtreecommitdiffstats
path: root/notes.c
diff options
context:
space:
mode:
Diffstat (limited to 'notes.c')
-rw-r--r--notes.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/notes.c b/notes.c
index 9736276f37..8e00fd8c47 100644
--- a/notes.c
+++ b/notes.c
@@ -894,7 +894,7 @@ static int string_list_add_note_lines(struct string_list *list,
* later, along with any empty strings that came from empty
* lines within the file.
*/
- string_list_split(list, data, '\n', -1);
+ string_list_split(list, data, "\n", -1);
free(data);
return 0;
}
@@ -938,13 +938,11 @@ out:
return ret;
}
-static int string_list_add_one_ref(const char *refname, const char *referent UNUSED,
- const struct object_id *oid UNUSED,
- int flag UNUSED, void *cb)
+static int string_list_add_one_ref(const struct reference *ref, void *cb)
{
struct string_list *refs = cb;
- if (!unsorted_string_list_has_string(refs, refname))
- string_list_append(refs, refname);
+ if (!unsorted_string_list_has_string(refs, ref->name))
+ string_list_append(refs, ref->name);
return 0;
}
@@ -973,8 +971,8 @@ void string_list_add_refs_from_colon_sep(struct string_list *list,
char *globs_copy = xstrdup(globs);
int i;
- string_list_split_in_place(&split, globs_copy, ":", -1);
- string_list_remove_empty_items(&split, 0);
+ string_list_split_in_place_f(&split, globs_copy, ":", -1,
+ STRING_LIST_SPLIT_NONEMPTY);
for (i = 0; i < split.nr; i++)
string_list_add_refs_by_glob(list, split.items[i].string);