set_changed_file_to_latest_name: Use the latest name of a file in every log entry

Description Usage Arguments Details Examples

View source: R/renamed-files.R

Description

Set the column changed_files of a log to the latest name of the file

Usage

1

Arguments

log

An unnested detailed log.

Details

parse_log_detailed() parses a git log. However, changed file names are not corrected retroactively. Hence, if one wants to process file-specific commit data for one file across different names for that file, the column changed_files has to be unified. This is done with this function by updating the file names recursively and setting them to the latest name used. Filenames containing the sequence => are viewed as renamed files, so there will likely be problems when you apply this function to a git repository that contains (or contained) files with such files names. You may have to update the column changed_file manually.

Examples

1
2
3
4
5
library("magrittr")
gitsumlog %>%
  tidyr::unnest() %>%
  set_changed_file_to_latest_name() %>%
  add_line_history()

lorenzwalthert/gitsum documentation built on Jan. 17, 2021, 9:34 p.m.