Skip to content

Commit 5efcd85

Browse files
committed
small fix
1 parent 62e24e2 commit 5efcd85

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/subcommand/merge_subcommand.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,7 @@ void merge_subcommand::create_merge_commit(
8484
auto author_committer_sign_now = signature_wrapper::signature_now(author_name, author_email, author_name, author_email);
8585

8686
// TODO: add a prompt to edit the merge message
87-
std::string msg_target = "";
88-
if (merge_ref)
89-
{
90-
msg_target = merge_ref->short_name();
91-
}
92-
else
93-
{
94-
msg_target = git_oid_tostr_s(&(merge_commit.oid()));
95-
}
87+
std::string msg_target = merge_ref ? merge_ref->short_name() : git_oid_tostr_s(&(merge_commit.oid()));
9688
std::string msg = merge_ref ? "Merge branch " : "Merge commit ";
9789
msg.append(msg_target);
9890

0 commit comments

Comments
 (0)