From: Junio C Hamano Date: Wed, 21 Nov 2018 13:57:58 +0000 (+0900) Subject: Merge branch 'tq/refs-internal-comment-fix' into maint X-Git-Tag: v2.19.2~27 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a75337341fb9dd7bac32a1fdc012dbf3281ef9be?ds=inline;hp=-c Merge branch 'tq/refs-internal-comment-fix' into maint Fix for typo in a sample code in comment. * tq/refs-internal-comment-fix: refs: docstring typo --- a75337341fb9dd7bac32a1fdc012dbf3281ef9be diff --combined refs/refs-internal.h index 89d7dd49cd,58b827e523..b425ae40b1 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@@ -1,8 -1,6 +1,8 @@@ #ifndef REFS_REFS_INTERNAL_H #define REFS_REFS_INTERNAL_H +#include "iterator.h" + /* * Data structures and functions for the internal use of the refs * module. Code outside of the refs module should use only the public @@@ -93,10 -91,11 +93,10 @@@ enum peel_status enum peel_status peel_object(const struct object_id *name, struct object_id *oid); /* - * Copy the reflog message msg to buf, which has been allocated sufficiently - * large, while cleaning up the whitespaces. Especially, convert LF to space, - * because reflog file is one line per entry. + * Copy the reflog message msg to sb while cleaning up the whitespaces. + * Especially, convert LF to space, because reflog file is one line per entry. */ -int copy_reflog_msg(char *buf, const char *msg); +void copy_reflog_msg(struct strbuf *sb, const char *msg); /** * Information needed for a single ref update. Set new_oid to the new @@@ -282,7 -281,7 +282,7 @@@ int refs_rename_ref_available(struct re * * // Access information about the current reference: * if (!(iter->flags & REF_ISSYMREF)) - * printf("%s is %s\n", iter->refname, oid_to_hex(&iter->oid)); + * printf("%s is %s\n", iter->refname, oid_to_hex(iter->oid)); * * // If you need to peel the reference: * ref_iterator_peel(iter, &oid); @@@ -474,9 -473,8 +474,9 @@@ extern struct ref_iterator *current_ref * adapter between the callback style of reference iteration and the * iterator style. */ -int do_for_each_ref_iterator(struct ref_iterator *iter, - each_ref_fn fn, void *cb_data); +int do_for_each_repo_ref_iterator(struct repository *r, + struct ref_iterator *iter, + each_repo_ref_fn fn, void *cb_data); /* * Only include per-worktree refs in a do_for_each_ref*() iteration.