mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 19:23:05 +00:00
branch: fix generated reflog message upon creation
This commit is contained in:
parent
bdf0e73450
commit
015d4b7b38
@ -86,7 +86,7 @@ int git_branch_create(
|
||||
if (git_buf_joinpath(&canonical_branch_name, GIT_REFS_HEADS_DIR, branch_name) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (git_buf_printf(&log_message, "Branch: created from %s", git_oid_tostr_s(git_commit_id(commit))) < 0)
|
||||
if (git_buf_printf(&log_message, "branch: Created from %s", git_oid_tostr_s(git_commit_id(commit))) < 0)
|
||||
goto cleanup;
|
||||
|
||||
error = git_reference_create(&branch, repository,
|
||||
|
@ -112,7 +112,7 @@ void test_refs_branches_create__default_reflog_message(void)
|
||||
cl_git_pass(git_reflog_read(&log, repo, "refs/heads/" NEW_BRANCH_NAME));
|
||||
|
||||
entry = git_reflog_entry_byindex(log, 0);
|
||||
cl_git_pass(git_buf_printf(&buf, "Branch: created from %s", git_oid_tostr_s(git_commit_id(target))));
|
||||
cl_git_pass(git_buf_printf(&buf, "branch: Created from %s", git_oid_tostr_s(git_commit_id(target))));
|
||||
cl_assert_equal_s(git_buf_cstr(&buf), git_reflog_entry_message(entry));
|
||||
cl_assert_equal_s(sig->email, git_reflog_entry_committer(entry)->email);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user