Skip to content

Commit 5958d4a

Browse files
committed
Use more precise wording.
1 parent af2f01b commit 5958d4a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

R/pr.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ pr_init <- function(branch) {
208208
if (!is.na(remref)) {
209209
comparison <- git_branch_compare(current_branch, remref)
210210
if (comparison$remote_only > 0) {
211-
challenge_uncommitted_changes()
211+
challenge_uncommitted_changes(which = c("pull", "switch branches"))
212212
}
213213
ui_bullets(c("v" = "Pulling changes from {.val {remref}}."))
214214
git_pull(remref = remref, verbose = FALSE)
@@ -258,7 +258,7 @@ pr_resume <- function(branch = NULL) {
258258
))
259259
}
260260

261-
challenge_uncommitted_changes(which = "switch")
261+
challenge_uncommitted_changes(which = c("pull", "switch", "compare branches"))
262262

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

288288
if (is.null(number)) {
289289
ui_bullets(c("i" = "No PR specified ... looking up open PRs."))
@@ -503,7 +503,7 @@ pr_pause <- function() {
503503
))
504504
return(invisible())
505505
}
506-
challenge_uncommitted_changes(which = "switch")
506+
challenge_uncommitted_changes(which = "switch branches")
507507
# TODO: what happens here if offline?
508508
check_branch_pulled(use = "pr_pull()")
509509

R/utils-git.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ challenge_uncommitted_changes <- function(
215215
"Uncommitted changes. Please commit before continuing.",
216216
call = caller_env()
217217
)
218-
return(invisible())
219218
}
220219
}
221220
}

0 commit comments

Comments
 (0)