Report the git status of all jobs

job_gitreport(show_clean = FALSE)



should clean repositories be included in the output?


A tibble with columns jobname, staged, unstaged, untracked, ahead and behind. The jobname column is a character vector, all others are integer valued.


The role of the git_report() function is to provide an overview of the status of all workbch jobs that are associated with a git repository. For every job, it uses git2r::in_repository to determine if the job folder (i.e., the path for that job) is in a git repository. Jobs that are not in git repositories are ignored.

For jobs that are associated with git repositories, the git_report() function calls git2r::status() to determine the git status. If there is an upstream set (i.e., git2r::branch_get_upstream() detects an upstream repository), it will also call git2r::ahead_behind() to determine how many commits the local repository is ahead and/or behind of the upstream.

By default, no output is shown for clean repositories (show_clean = FALSE). A repository is deemed to be clean if there are no staged, unstaged or untracked files and it is neither ahead nor behind the upstream repository. If the user specifies show_clean = TRUE, then results are reported for every job that is linked to a git repository.