@@ -456,7 +456,7 @@ repository_fetch(::git_repository* repository, std::string const& remote_name =
456456}
457457
458458[[nodiscard]] git_error
459- git_fetch_and_update (std::string const & url, std::string const & rev, std::filesystem::path path, git_checkout_flags flags)
459+ git_fetch_and_update (std::string const & url, std::string const & rev, std::filesystem::path path, repository_flags flags)
460460{
461461 auto const & _ = git_lib_initialize ();
462462
@@ -478,17 +478,17 @@ git_fetch_and_update(std::string const& url, std::string const& rev, std::filesy
478478 return remote_url_o.error ();
479479 }
480480
481- auto fetch = to_bool (flags & git_checkout_flags ::force_fetch);
481+ auto fetch = to_bool (flags & repository_flags ::force_fetch);
482482 if (auto result = repository_matches_rev (repository, rev)) {
483483 switch (*result) {
484484 case rev_match::rev_not_found:
485- if (to_bool (flags & git_checkout_flags ::fresh_clone)) {
485+ if (to_bool (flags & repository_flags ::fresh_clone)) {
486486 return git_error::rev_not_found;
487487 }
488488 [[fallthrough]];
489489 case rev_match::not_checked_out:
490490 case rev_match::checked_out_branch:
491- fetch |= not to_bool (flags & git_checkout_flags ::fresh_clone);
491+ fetch |= not to_bool (flags & repository_flags ::fresh_clone);
492492 break ;
493493 case rev_match::checked_out:
494494 // Revisions that are tags or commits will not cause a fetch.
@@ -522,9 +522,9 @@ git_fetch_and_update(std::string const& url, std::string const& rev, std::filesy
522522 }
523523
524524 auto clean = checkout;
525- clean |= to_bool (flags & git_checkout_flags ::force_clean);
525+ clean |= to_bool (flags & repository_flags ::force_clean);
526526 // A fresh clone does not need to be cleaned.
527- clean &= not to_bool (flags & git_checkout_flags ::fresh_clone);
527+ clean &= not to_bool (flags & repository_flags ::fresh_clone);
528528
529529 if (clean) {
530530 if (auto result = repository_clean (repository); result != git_error::ok) {
@@ -584,7 +584,7 @@ git_fetch_and_update(std::string const& url, std::string const& rev, std::filesy
584584}
585585
586586[[nodiscard]] git_error git_checkout_or_clone (
587- std::string const & url, std::string const & rev, std::filesystem::path path, git_checkout_flags flags)
587+ std::string const & url, std::string const & rev, std::filesystem::path path, repository_flags flags)
588588{
589589 // First try and just update the repository.
590590 switch (git_fetch_and_update (url, rev, path, flags)) {
@@ -614,7 +614,7 @@ git_fetch_and_update(std::string const& url, std::string const& rev, std::filesy
614614 }
615615
616616 // In case rev is a tag or commit, checkout/update the repository.
617- flags |= git_checkout_flags ::fresh_clone;
617+ flags |= repository_flags ::fresh_clone;
618618 return git_fetch_and_update (url, rev, path, flags);
619619}
620620
0 commit comments