]> git.ipfire.org Git - thirdparty/git.git/commitdiff
notes: rename to load_display_notes()
authorDenton Liu <liu.denton@gmail.com>
Mon, 9 Dec 2019 13:10:39 +0000 (05:10 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Dec 2019 21:36:42 +0000 (13:36 -0800)
According to the function comment, init_display_notes() was supposed to
"Load the notes machinery for displaying several notes trees." Rename
this function to load_display_notes() so that its use is more accurately
represented.

This is done because, in a future commit, we will reuse the name
init_display_notes().

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c
notes.c
notes.h

index dad63cffc63eaac157f749de2379ac58e77cae76..622d6a6cb16acf4353170cb60fe6648e3ce2f33f 100644 (file)
@@ -202,7 +202,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
        if (!rev->show_notes_given && (!rev->pretty_given || w.notes))
                rev->show_notes = 1;
        if (rev->show_notes)
-               init_display_notes(&rev->notes_opt);
+               load_display_notes(&rev->notes_opt);
 
        if ((rev->diffopt.pickaxe_opts & DIFF_PICKAXE_KINDS_MASK) ||
            rev->diffopt.filter || rev->diffopt.flags.follow_renames)
@@ -1749,7 +1749,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
                rev.diffopt.flags.binary = 1;
 
        if (rev.show_notes)
-               init_display_notes(&rev.notes_opt);
+               load_display_notes(&rev.notes_opt);
 
        if (!output_directory && !use_stdout)
                output_directory = config_output_directory;
diff --git a/notes.c b/notes.c
index 532ec37865768d05a31606f495b4f0c1645ea757..fd6cef14a3b73456638924311268b64dc696eee6 100644 (file)
--- a/notes.c
+++ b/notes.c
@@ -1039,7 +1039,7 @@ struct notes_tree **load_notes_trees(struct string_list *refs, int flags)
        return trees;
 }
 
-void init_display_notes(struct display_notes_opt *opt)
+void load_display_notes(struct display_notes_opt *opt)
 {
        char *display_ref_env;
        int load_config_refs = 0;
diff --git a/notes.h b/notes.h
index 414bc6855ad1593fb281f6a829797b34f3fb2e12..1ce528442a55371c3f7c96c5dd525ea2c071e311 100644 (file)
--- a/notes.h
+++ b/notes.h
@@ -272,18 +272,18 @@ struct display_notes_opt {
  * - extra_notes_refs may contain a list of globs (in the same style
  *   as notes.displayRef) where notes should be loaded from.
  */
-void init_display_notes(struct display_notes_opt *opt);
+void load_display_notes(struct display_notes_opt *opt);
 
 /*
  * Append notes for the given 'object_sha1' from all trees set up by
- * init_display_notes() to 'sb'.  The 'flags' are a bitwise
+ * load_display_notes() to 'sb'.  The 'flags' are a bitwise
  * combination of
  *
  * - NOTES_SHOW_HEADER: add a 'Notes (refname):' header
  *
  * - NOTES_INDENT: indent the notes by 4 places
  *
- * You *must* call init_display_notes() before using this function.
+ * You *must* call load_display_notes() before using this function.
  */
 void format_display_notes(const struct object_id *object_oid,
                          struct strbuf *sb, const char *output_encoding, int raw);