git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v8 03/10] copy_msg(): rename to copy_reflog_msg()

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Nov 10, 2015, 11:42 UTC
Message-ID
<d5951e1c72531c497febfb08f5425c5080218476.1447154711.git.mhagger@alum.mit.edu>
In-Reply-To
<cover.1447154711.git.mhagger@alum.mit.edu>
From: David Turner <dturner@twopensource.com>

We will soon increase the visibility of this function, so make its name more distinctive.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
 refs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index ddcdf81..480de9a 100644
--- a/refs.c
+++ b/refs.c
@@ -3287,7 +3287,7 @@ static int commit_ref(struct ref_lock *lock)
  * large, while cleaning up the whitespaces.  Especially, convert LF to space,
  * because reflog file is one line per entry.
  */
-static int copy_msg(char *buf, const char *msg)
+static int copy_reflog_msg(char *buf, const char *msg)
 {
 	char *cp = buf;
 	char c;
@@ -3391,7 +3391,7 @@ static int log_ref_write_fd(int fd, const unsigned char *old_sha1,
 			sha1_to_hex(new_sha1),
 			committer);
 	if (msglen)
-		len += copy_msg(logrec + len - 1, msg) - 1;
+		len += copy_reflog_msg(logrec + len - 1, msg) - 1;
 
 	written = len <= maxlen ? write_in_full(fd, logrec, len) : -1;
 	free(logrec);
-- 
2.6.2
Previous: Michael HaggertyNext: Michael Haggerty
Message 4 of 13 in “refs backend pre-vtable”
  1. 00/10 refs backend pre-vtableMichael Haggerty, Nov 10, 2015
  2. 01/10 verify_refname_available(): rename functionMichael Haggerty, Nov 10, 2015
  3. 02/10 verify_refname_available(): new functionMichael Haggerty, Nov 10, 2015
  4. 03/10 copy_msg(): rename to copy_reflog_msg()Michael Haggerty, Nov 10, 2015
  5. 04/10 pack_if_possible_fn(): use ref_type() instead of is_per_worktree_ref()Michael Haggerty, Nov 10, 2015
  6. 05/10 refname_is_safe(): improve docstringMichael Haggerty, Nov 10, 2015
  7. 06/10 refs/refs-internal.h: new header fileMichael Haggerty, Nov 10, 2015
  8. 08/10 initdb: make safe_create_dir publicMichael Haggerty, Nov 10, 2015
  9. 09/10 files_log_ref_write: new functionMichael Haggerty, Nov 10, 2015
  10. 10/10 refs: break out ref conflict checksMichael Haggerty, Nov 10, 2015
  11. David TurnerNov 16, 2015
  12. Jeff KingNov 19, 2015
  13. Michael HaggertyNov 20, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.