| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| else | ||
| { | ||
| msg.append("commit "); | ||
| } |
There was a problem hiding this comment.
These two "if/else" sections can be merged into a single one. Or you could use the ternary operator to initilaze the message in a single line:
std::string msg = merge_ref ? "Merge branch" : "Merge commit'";
Sorry, something went wrong.
| } | ||
|
|
||
| void create_merge_commit(repository_wrapper& repo, const index_wrapper& index, std::vector<std::string> m_branches_to_merge, | ||
| const annotated_commit_list_wrapper& commits_to_merge, size_t num_commits_to_merge) |
There was a problem hiding this comment.
create_merge_commit could be a method of the merge_subcommand class; this way it would have access to the m_changes_to_merge member, and this parameter can be removed. If we prefer to keep it as a free function, then the parameter should be renamed in branches_to_merge (the m_ prefix should be reserved for class members).
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks @SandrineP
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add merge commit