summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-02-21 01:10:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-21 06:04:47 (GMT)
commit893dbf5ba16c47c7284209bc6c527195f368ee35 (patch)
tree6c71c65515ed4a843cc1a53bbe3d7539d3cfa4a9 /refs
parentde922669ab0508109cdb5672e5515f7524e3ccf8 (diff)
downloadgit-893dbf5ba16c47c7284209bc6c527195f368ee35.zip
git-893dbf5ba16c47c7284209bc6c527195f368ee35.tar.gz
git-893dbf5ba16c47c7284209bc6c527195f368ee35.tar.bz2
rename_ref: replace empty message in HEAD's log
When the current branch is renamed, the deletion of the old ref is recorded in HEAD's log with an empty message. Now that delete_ref() accepts a reflog message, provide a more descriptive message by passing along the log message that is given to rename_ref(). The next step will be to extend HEAD's log to also include the second part of the rename, the creation of the new branch. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Kyle Meyer <kyle@kyleam.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 299eb4d..f6e7c19 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2616,7 +2616,7 @@ static int files_rename_ref(struct ref_store *ref_store,
return error("unable to move logfile logs/%s to "TMP_RENAMED_LOG": %s",
oldrefname, strerror(errno));
- if (delete_ref(NULL, oldrefname, orig_sha1, REF_NODEREF)) {
+ if (delete_ref(logmsg, oldrefname, orig_sha1, REF_NODEREF)) {
error("unable to delete old %s", oldrefname);
goto rollback;
}