git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Han-Wen Nienhuys <hanwenn@gmail.com>,
	Han-Wen Nienhuys <hanwen@google.com>
Subject: [PATCH 3/4] checkout: add '\n' to reflog message
Date: Tue, 30 Jun 2020 12:05:37 +0000	[thread overview]
Message-ID: <8a62cc26686b1bb2f04cb01c79e336dca397a330.1593518738.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.669.git.1593518738.gitgitgadget@gmail.com>

From: Han-Wen Nienhuys <hanwen@google.com>

This makes check consistent with the rest of the git code, which tends to use a
trailing '\n' when writing reflog messages.  (The storage layer adds a '\n'
when it is missing.)

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 builtin/checkout.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/builtin/checkout.c b/builtin/checkout.c
index af849c644f..bb11fcc4e9 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -884,8 +884,9 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
 
 	reflog_msg = getenv("GIT_REFLOG_ACTION");
 	if (!reflog_msg)
-		strbuf_addf(&msg, "checkout: moving from %s to %s",
-			old_desc ? old_desc : "(invalid)", new_branch_info->name);
+		strbuf_addf(&msg, "checkout: moving from %s to %s\n",
+			    old_desc ? old_desc : "(invalid)",
+			    new_branch_info->name);
 	else
 		strbuf_insertstr(&msg, 0, reflog_msg);
 
-- 
gitgitgadget


  parent reply	other threads:[~2020-06-30 12:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 12:05 [PATCH 0/4] Preliminary fixes for reftable support Han-Wen Nienhuys via GitGitGadget
2020-06-30 12:05 ` [PATCH 1/4] lib-t6000.sh: write tag using git-update-ref Han-Wen Nienhuys via GitGitGadget
2020-06-30 12:05 ` [PATCH 2/4] t3432: use git-reflog to inspect the reflog for HEAD Han-Wen Nienhuys via GitGitGadget
2020-06-30 12:05 ` Han-Wen Nienhuys via GitGitGadget [this message]
2020-06-30 12:05 ` [PATCH 4/4] Treat BISECT_HEAD as a pseudo ref Han-Wen Nienhuys via GitGitGadget
2020-07-07  4:40 ` [PATCH 0/4] Preliminary fixes for reftable support Junio C Hamano
2020-07-10 17:19 ` [PATCH v2 " Han-Wen Nienhuys via GitGitGadget
2020-07-10 17:19   ` [PATCH v2 1/4] lib-t6000.sh: write tag using git-update-ref Han-Wen Nienhuys via GitGitGadget
2020-07-10 17:19   ` [PATCH v2 2/4] t3432: use git-reflog to inspect the reflog for HEAD Han-Wen Nienhuys via GitGitGadget
2020-07-10 17:19   ` [PATCH v2 3/4] Treat BISECT_HEAD as a pseudo ref Han-Wen Nienhuys via GitGitGadget
2020-07-10 17:19   ` [PATCH v2 4/4] Cleanse reflog messages in the refs.c layer Junio C Hamano via GitGitGadget
2020-07-10 21:06     ` Junio C Hamano
2020-07-10 20:57   ` [PATCH v2 0/4] Preliminary fixes for reftable support Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=8a62cc26686b1bb2f04cb01c79e336dca397a330.1593518738.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hanwen@google.com \
    --cc=hanwenn@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).