Skip to content

Commit

Permalink
Use more precise wording.
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Jul 25, 2024
1 parent af2f01b commit 5958d4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions R/pr.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ pr_init <- function(branch) {
if (!is.na(remref)) {
comparison <- git_branch_compare(current_branch, remref)
if (comparison$remote_only > 0) {
challenge_uncommitted_changes()
challenge_uncommitted_changes(which = c("pull", "switch branches"))

Check warning on line 211 in R/pr.R

View check run for this annotation

Codecov / codecov/patch

R/pr.R#L211

Added line #L211 was not covered by tests
}
ui_bullets(c("v" = "Pulling changes from {.val {remref}}."))
git_pull(remref = remref, verbose = FALSE)
Expand Down Expand Up @@ -258,7 +258,7 @@ pr_resume <- function(branch = NULL) {
))
}

challenge_uncommitted_changes(which = "switch")
challenge_uncommitted_changes(which = c("pull", "switch", "compare branches"))

Check warning on line 261 in R/pr.R

View check run for this annotation

Codecov / codecov/patch

R/pr.R#L261

Added line #L261 was not covered by tests

ui_bullets(c("v" = "Switching to branch {.val {branch}}."))
gert::git_branch_checkout(branch, repo = repo)
Expand All @@ -283,7 +283,7 @@ pr_resume <- function(branch = NULL) {
pr_fetch <- function(number = NULL, target = c("source", "primary")) {
repo <- git_repo()
tr <- target_repo(github_get = NA, role = target, ask = FALSE)
challenge_uncommitted_changes(which = "switch")
challenge_uncommitted_changes(which = c("pull", "switch branches"))

Check warning on line 286 in R/pr.R

View check run for this annotation

Codecov / codecov/patch

R/pr.R#L286

Added line #L286 was not covered by tests

if (is.null(number)) {
ui_bullets(c("i" = "No PR specified ... looking up open PRs."))
Expand Down Expand Up @@ -503,7 +503,7 @@ pr_pause <- function() {
))
return(invisible())
}
challenge_uncommitted_changes(which = "switch")
challenge_uncommitted_changes(which = "switch branches")

Check warning on line 506 in R/pr.R

View check run for this annotation

Codecov / codecov/patch

R/pr.R#L506

Added line #L506 was not covered by tests
# TODO: what happens here if offline?
check_branch_pulled(use = "pr_pull()")

Expand Down
1 change: 0 additions & 1 deletion R/utils-git.R
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ challenge_uncommitted_changes <- function(
"Uncommitted changes. Please commit before continuing.",
call = caller_env()
)

Check warning on line 217 in R/utils-git.R

View check run for this annotation

Codecov / codecov/patch

R/utils-git.R#L214-L217

Added lines #L214 - L217 were not covered by tests
return(invisible())
}
}
}
Expand Down

0 comments on commit 5958d4a

Please sign in to comment.