
"I want to find which commit deleted a line!"
Source:R/exo-log-deleted-line.R
exo_log_deleted_line.RdI want to find which commit deleted the line "iris" from the text file.
The tool for that is git log -S<string> path/to/file
or git log -G<regex> path/to/file.
Workflow
Running the function will create the exercise as a new folder in parent_path.
If called from RStudio or Positron, the function will open a new R session in
that IDE.
If not, the user will need to navigate to the path returned by the function,
and launch an R session from there.
The new R session will display messages about what challenge to solve,
and running the tip() function from that new R session will display
additional guiance.
Examples
if (FALSE) { # interactive()
parent_path <- withr::local_tempdir()
path <- exo_log_deleted_line(parent_path = parent_path)
}