clean strings (#54) · QuantStack/git2cpp@3cd3904 · GitHub
Skip to content

Commit 3cd3904

Browse files
authored
clean strings (#54)
1 parent 437e2b7 commit 3cd3904

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/subcommand/checkout_subcommand.cpp

Lines changed: 3 additions & 3 deletions

src/subcommand/checkout_subcommand.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ class checkout_subcommand
2020
annotated_commit_wrapper create_local_branch
2121
(
2222
repository_wrapper& repo,
23-
const std::string& target_name,
23+
const std::string_view target_name,
2424
bool force
2525
);
2626

2727
void checkout_tree
2828
(
2929
const repository_wrapper& repo,
3030
const annotated_commit_wrapper& target_annotated_commit,
31-
const std::string& target_name,
31+
const std::string_view target_name,
3232
const git_checkout_options& options
3333
);
3434

3535
void update_head
3636
(
3737
repository_wrapper& repo,
3838
const annotated_commit_wrapper& target_annotated_commit,
39-
const std::string& target_name
39+
const std::string_view target_name
4040
);
4141

4242
std::string m_branch_name = {};

src/utils/git_exception.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ void throw_if_error(int exit_code)
1111
}
1212

1313

14-
git_exception::git_exception(const std::string& message, int error_code)
14+
git_exception::git_exception(const std::string_view message, int error_code)
1515
: m_message(message), m_error_code(error_code)
1616
{}
1717

src/utils/git_exception.hpp

Lines changed: 3 additions & 1 deletion

0 commit comments

Comments
 (0)