Skip to content

Commit

Permalink
copy_msg(): rename to copy_reflog_msg()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jeff King <peff@peff.net>
  • Loading branch information
David Turner authored and Jeff King committed Nov 20, 2015
1 parent d336123 commit f4a5721
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f4a5721

Please sign in to comment.