File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -193,15 +193,22 @@ challenge_uncommitted_changes <- function(
193193 rstudioapi :: documentSaveAll()
194194 }
195195
196- default_msg <- "
197- There are uncommitted changes, which may cause problems or be lost when \\
198- we {.or {which}}"
199- msg <- glue(msg %|| % default_msg )
200- if (git_uncommitted(untracked = untracked )) {
201- if (ui_yep(c(
202- " !" = msg ,
203- " " = " Do you want to proceed anyway?"
204- ))) {
196+ default_msg <-
197+ " Uncommitted changes may cause problems or be lost when we {.or {which}}."
198+ msg <- cli :: format_inline(msg %|| % default_msg )
199+
200+ uncommited <- git_status(untracked )
201+ if (nrow(uncommited ) > 0 ) {
202+ choice <- utils :: menu(
203+ c(
204+ " I want to proceed anyway." ,
205+ cli :: format_inline(
206+ " I want to take a closer look at {.file {uncommited$file}} first."
207+ )
208+ ),
209+ title = msg
210+ )
211+ if (choice == 1 ) {
205212 return (invisible ())
206213 } else {
207214 ui_abort(" Uncommitted changes. Please commit before continuing." , call = NULL )
You can’t perform that action at this time.
0 commit comments