mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-12 10:01:10 +00:00
branch: fix generated reflog message upon renaming
This commit is contained in:
parent
015d4b7b38
commit
7eb7673406
@ -236,7 +236,7 @@ int git_branch_move(
|
|||||||
if ((error = git_buf_joinpath(&new_reference_name, GIT_REFS_HEADS_DIR, new_branch_name)) < 0)
|
if ((error = git_buf_joinpath(&new_reference_name, GIT_REFS_HEADS_DIR, new_branch_name)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
if ((error = git_buf_printf(&log_message, "Branch: renamed %s to %s",
|
if ((error = git_buf_printf(&log_message, "branch: renamed %s to %s",
|
||||||
git_reference_name(branch), git_buf_cstr(&new_reference_name))) < 0)
|
git_reference_name(branch), git_buf_cstr(&new_reference_name))) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ void test_refs_branches_move__default_reflog_message(void)
|
|||||||
|
|
||||||
cl_git_pass(git_reflog_read(&log, repo, git_reference_name(new_branch)));
|
cl_git_pass(git_reflog_read(&log, repo, git_reference_name(new_branch)));
|
||||||
entry = git_reflog_entry_byindex(log, 0);
|
entry = git_reflog_entry_byindex(log, 0);
|
||||||
cl_assert_equal_s("Branch: renamed refs/heads/master to refs/heads/master2",
|
cl_assert_equal_s("branch: renamed refs/heads/master to refs/heads/master2",
|
||||||
git_reflog_entry_message(entry));
|
git_reflog_entry_message(entry));
|
||||||
cl_assert_equal_s(sig->email, git_reflog_entry_committer(entry)->email);
|
cl_assert_equal_s(sig->email, git_reflog_entry_committer(entry)->email);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user