Manually Unignore Files or Directories in .gitignore and .Rbuildignore
      projr_unignore_manual.RdThese functions allow manual addition of files and directories to the
.gitignore and .Rbuildignore files after the projr-managed block,
thereby forcing them to be not ignored.
projr_unignore_manual: General function to unignore both files and directories in both.gitignoreand.Rbuildignore. If a path does not exist, it is treated as a file.projr_unignore_manual_dir: Specifically unignores directories in both.gitignoreand.Rbuildignore.projr_unignore_manual_file: Specifically unignores files in both.gitignoreand.Rbuildignore.projr_unignore_manual_dir_gitandprojr_unignore_manual_file_git: Add directories or files explicitly (with a!prefix) to.gitignore.projr_unignore_manual_dir_rbuildandprojr_unignore_manual_file_rbuild: Add directories or files explicitly (with a!prefix) to.Rbuildignore.
Usage
projr_unignore_manual(unignore)
projr_unignore_manual_dir(unignore)
projr_unignore_manual_file(unignore)
projr_unignore_manual_file_git(unignore)
projr_unignore_manual_dir_git(unignore)
projr_unignore_manual_file_rbuild(unignore)
projr_unignore_manual_dir_rbuild(unignore)Value
Invisibly returns TRUE if the operation succeeds, or FALSE if the input
contains invalid (empty) paths.
Details
These functions provide fine-grained control for cases where users want to
undo any ignoring behavior for specific paths permanently. They do not
interact with the automated ignore management system of projr.
Non-existent paths provided to
projr_unignore_manualare assumed to be files.For
.gitignore, unignored directories are automatically appended with/**if missing, then prepended with!, ensuring proper Git unignore syntax.For
.Rbuildignore, paths are converted to regular expressions usingglob2rx(), and then prepended with!for compatibility with R's build tools.
See also
projr_ignore_manual for manually ignoring paths, and projr_ignore_auto for
dynamically managed ignore entries.
Examples
# Manually unignore files and directories
projr_unignore_manual(c("output", "tempfile.log"))
#> Error in ind_vec[["top"]]: subscript out of bounds
# Specifically unignore directories
projr_unignore_manual_dir("data")
#> Error in ind_vec[["top"]]: subscript out of bounds
# Specifically unignore files
projr_unignore_manual_file("README.md")
#> Error in ind_vec[["top"]]: subscript out of bounds