From: Han-Wen Nienhuys via GitGitGadget Date: Tue, 30 Jun 2020 12:05:37 GMT Subject: [PATCH 3/4] checkout: add '\n' to reflog message Message-ID: <8a62cc26686b1bb2f04cb01c79e336dca397a330.1593518738.git.gitgitgadget@gmail.com> In-Reply-To: From: Han-Wen Nienhuys 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 --- 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