@@ -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) {
283283pr_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
0 commit comments