FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Clean strings by SandrineP · Pull Request #54 · QuantStack/git2cpp · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cpp  (2) .hpp  (2) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
6 changes: 3 additions & 3 deletions src/subcommand/checkout_subcommand.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void checkout_subcommand::run()
annotated_commit_wrapper checkout_subcommand::create_local_branch
(
repository_wrapper& repo,
const std::string& target_name,
const std::string_view target_name,
bool force
)
{
Expand All @@ -71,7 +71,7 @@ void checkout_subcommand::checkout_tree
(
const repository_wrapper& repo,
const annotated_commit_wrapper& target_annotated_commit,
const std::string& target_name,
const std::string_view target_name,
const git_checkout_options& options
)
{
Expand All @@ -83,7 +83,7 @@ void checkout_subcommand::update_head
(
repository_wrapper& repo,
const annotated_commit_wrapper& target_annotated_commit,
const std::string& target_name
const std::string_view target_name
)
{
std::string_view annotated_ref = target_annotated_commit.reference_name();
Expand Down
6 changes: 3 additions & 3 deletions src/subcommand/checkout_subcommand.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ class checkout_subcommand
annotated_commit_wrapper create_local_branch
(
repository_wrapper& repo,
const std::string& target_name,
const std::string_view target_name,
bool force
);

void checkout_tree
(
const repository_wrapper& repo,
const annotated_commit_wrapper& target_annotated_commit,
const std::string& target_name,
const std::string_view target_name,
const git_checkout_options& options
);

void update_head
(
repository_wrapper& repo,
const annotated_commit_wrapper& target_annotated_commit,
const std::string& target_name
const std::string_view target_name
);

std::string m_branch_name = {};
Expand Down
2 changes: 1 addition & 1 deletion src/utils/git_exception.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void throw_if_error(int exit_code)
}


git_exception::git_exception(const std::string& message, int error_code)
git_exception::git_exception(const std::string_view message, int error_code)
: m_message(message), m_error_code(error_code)
{}

Expand Down
4 changes: 3 additions & 1 deletion src/utils/git_exception.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ void throw_if_error(int exit_code);
class git_exception : public std::exception
{
public:
git_exception(const std::string& message, int error_code);

git_exception(const std::string_view message, int error_code);

int error_code() const;

const char* what() const noexcept override;

private:

std::string m_message;
int m_error_code;
};

Back | FazBrowse Home | New Git URL