@@ -258,7 +258,7 @@ pr_resume <- function(branch = NULL) {
258258 ))
259259 }
260260
261- challenge_uncommitted_changes()
261+ challenge_uncommitted_changes(which = " switch " )
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()
286+ challenge_uncommitted_changes(which = " switch " )
287287
288288 if (is.null(number )) {
289289 ui_bullets(c(" i" = " No PR specified ... looking up open PRs." ))
@@ -377,7 +377,7 @@ pr_push <- function() {
377377 check_for_config(cfg , ok_configs = c(" ours" , " fork" ))
378378 default_branch <- git_default_branch()
379379 check_pr_branch(default_branch )
380- challenge_uncommitted_changes()
380+ challenge_uncommitted_changes(which = " push " )
381381
382382 branch <- git_branch()
383383 remref <- git_branch_tracking(branch )
@@ -425,7 +425,7 @@ pr_pull <- function() {
425425 check_for_config(cfg )
426426 default_branch <- git_default_branch()
427427 check_pr_branch(default_branch )
428- challenge_uncommitted_changes()
428+ challenge_uncommitted_changes(which = " pull " )
429429
430430 git_pull()
431431
@@ -440,7 +440,7 @@ pr_pull <- function() {
440440# ' @rdname pull-requests
441441pr_merge_main <- function () {
442442 tr <- target_repo(github_get = TRUE , ask = FALSE )
443- challenge_uncommitted_changes()
443+ challenge_uncommitted_changes(which = " pull " )
444444 remref <- glue(" {tr$remote}/{tr$default_branch}" )
445445 ui_bullets(c(" v" = " Pulling changes from {.val {remref}}." ))
446446 git_pull(remref , verbose = FALSE )
@@ -503,7 +503,7 @@ pr_pause <- function() {
503503 ))
504504 return (invisible ())
505505 }
506- challenge_uncommitted_changes()
506+ challenge_uncommitted_changes(which = " switch " )
507507 # TODO: what happens here if offline?
508508 check_branch_pulled(use = " pr_pull()" )
509509
0 commit comments