repo_splitter.git_tools.files package¶
Submodules¶
repo_splitter.git_tools.files.all module¶
repo_splitter.git_tools.files.renames module¶
-
repo_splitter.git_tools.files.renames.
all_file_names_which_have_contained_the_lines_in_a_file
(file_path, repo)[source]¶ Parses the git log for all lines in a file, to determine all the file paths in which these lines have existed.
Useful for tracking renames in a repo.
-
repo_splitter.git_tools.files.renames.
all_file_names_which_have_contained_the_lines_in_multiple_files
(file_paths, repo)[source]¶ Parses the git log for all lines in multiple files, to determine all the file paths in which these lines have existed.
Useful for tracking renames in a repo.
-
repo_splitter.git_tools.files.renames.
file_length
(file_path)[source]¶ Returns the number of lines in a file
- Return type
int
repo_splitter.git_tools.files.unwanted module¶
repo_splitter.git_tools.files.wanted module¶
-
repo_splitter.git_tools.files.wanted.
get_desired_files_from_patterns
(repo, file_patterns, follow_renames=True)[source]¶ Pass glob file patterns relative to repo root such as data/** or code/* or code/my_module.py
Handles resolving within the repo, and expanding globs into full relative file paths
- Parameters
data/** or code/* or code/my_module.py :type _sphinx_paramlinks_repo_splitter.git_tools.files.wanted.get_desired_files_from_patterns.follow_renames:
bool
:param _sphinx_paramlinks_repo_splitter.git_tools.files.wanted.get_desired_files_from_patterns.follow_renames: Whether to track previous names of files from the history and also include those :rtype:List
[str
] :return: