Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2020-07-31 14:36:10 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-31 20:21:51 +0300
commit25429fed5ce134bce9f729d927ac397badae1959 (patch)
tree182662725dcae632c49e99c4c1725771f8bba41f /refs.c
parent523fa69c36744ae6779e38614cb9bfb2be552923 (diff)
refs: move the logic to add \t to reflog to the files backend
523fa69c (reflog: cleanse messages in the refs.c layer, 2020-07-10) centralized reflog normalizaton. However, the normalizaton added a leading "\t" to the message. This is an artifact of the reflog storage format in the files backend, so it should be added there. Routines that parse back the reflog (such as grab_nth_branch_switch) expect the "\t" to not be in the message, so without this fix, git with reftable cannot process the "@{-1}" syntax. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index b1dc81640b..9d58e17eaf 100644
--- a/refs.c
+++ b/refs.c
@@ -875,7 +875,6 @@ static void copy_reflog_msg(struct strbuf *sb, const char *msg)
char c;
int wasspace = 1;
- strbuf_addch(sb, '\t');
while ((c = *msg++)) {
if (wasspace && isspace(c))
continue;