All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denton Liu <liu.denton@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Elijah Newren <newren@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Beat Bolli <dev+git@drbeat.li>, Pavel Roskin <plroskin@gmail.com>
Subject: [PATCH 1/5] notes: rename to load_display_notes()
Date: Mon, 9 Dec 2019 05:10:39 -0800	[thread overview]
Message-ID: <4132d5bb7b354355a6dbe8049601f166b5de8fa8.1575896661.git.liu.denton@gmail.com> (raw)
In-Reply-To: <cover.1575896661.git.liu.denton@gmail.com>

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>
---
 builtin/log.c | 4 ++--
 notes.c       | 2 +-
 notes.h       | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/builtin/log.c b/builtin/log.c
index dad63cffc6..622d6a6cb1 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -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 532ec37865..fd6cef14a3 100644
--- 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 414bc6855a..1ce528442a 100644
--- 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);
-- 
2.24.0.627.geba02921db


  reply	other threads:[~2019-12-09 13:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09 13:10 [PATCH 0/5] format-patch: improve handling of `format.notes` Denton Liu
2019-12-09 13:10 ` Denton Liu [this message]
2019-12-09 13:10 ` [PATCH 2/5] notes: create init_display_notes() helper Denton Liu
2019-12-09 13:10 ` [PATCH 3/5] notes: extract logic into set_display_notes() Denton Liu
2019-12-09 16:26   ` Eric Sunshine
2019-12-09 19:19     ` Denton Liu
2019-12-10 11:22       ` Philip Oakley
2019-12-09 13:10 ` [PATCH 4/5] format-patch: use --notes behavior for format.notes Denton Liu
2019-12-09 13:10 ` [PATCH 5/5] format-patch: move git_config() before repo_init_revisions() Denton Liu
2019-12-09 21:36 ` [PATCH 0/5] format-patch: improve handling of `format.notes` Junio C Hamano
2019-12-09 21:42 ` Elijah Newren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4132d5bb7b354355a6dbe8049601f166b5de8fa8.1575896661.git.liu.denton@gmail.com \
    --to=liu.denton@gmail.com \
    --cc=dev+git@drbeat.li \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=plroskin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.