summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-03-06 22:44:15 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2015-03-06 22:44:15 +0100
commit91de1b09371a8b044e9a537b4dd4c8c49871d058 (patch)
tree88fd938ff448499d981f17376483620da2947463
parentbdf0e734506b5b18234d48a0e7c6995aeda30b9d (diff)
parent05e644dd7e0e5694805b25d315b6a0945dcbc4e8 (diff)
downloadlibgit2-91de1b09371a8b044e9a537b4dd4c8c49871d058.tar.gz
Merge pull request #2950 from libgit2/ntk/reflog_branch_create
branch: fix generated reflog message upon creation
-rw-r--r--src/branch.c6
-rw-r--r--tests/refs/branches/create.c2
-rw-r--r--tests/refs/branches/move.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/branch.c b/src/branch.c
index 06602c525..a16d3a3f9 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -82,11 +82,11 @@ int git_branch_create(
error = -1;
goto cleanup;
}
-
+
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,
@@ -236,7 +236,7 @@ int git_branch_move(
if ((error = git_buf_joinpath(&new_reference_name, GIT_REFS_HEADS_DIR, new_branch_name)) < 0)
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)
goto done;
diff --git a/tests/refs/branches/create.c b/tests/refs/branches/create.c
index dc805789f..d4cf4c29f 100644
--- a/tests/refs/branches/create.c
+++ b/tests/refs/branches/create.c
@@ -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);
diff --git a/tests/refs/branches/move.c b/tests/refs/branches/move.c
index 6e335d1fa..fa0b2faca 100644
--- a/tests/refs/branches/move.c
+++ b/tests/refs/branches/move.c
@@ -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)));
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));
cl_assert_equal_s(sig->email, git_reflog_entry_committer(entry)->email);