Analyze existing repository in /path/to/repository/.git
:
GIT_DIR=/path/to/repository/.git sh /path/to/gitlog2tsv.sh
Clone remote repository in URL https://domain.part/repository
and analyze it:
sh /path/to/gitlog2tsv.sh https://domain.part/repository
Clone list of repositories in file /path/to/repo/list
(one URL in line) and analyze them:
xargs -I{} sh /path/to/gitlog2tsv.sh {} \; </path/to/repo/list
Script generates a gzipped file with name of form
repository-directory.tsv.gz
in the current working directory.
Latter two formats of the command clones repositories under current
working directory with name of form repository.git
. Repositories
are cloned as bare repositories.
Lines with non-empty first tab-separated fields contain commit information:
- Commit hash
- Parent hashes (separated by spaces if multiple. Empty if root)
- Author name
- Author email
- Author timestamp
- Committer name
- Committer email
- Committer timestamp
- Refs (separated by spaces if multiple)
- Commit message
Backslashes and tabs are escaped in fields 1-8 and 10, although only commit message and author/committer names can have tabs.
Lines with empty first field and non-empty second field:
- Old filename
- New filename
Filenames are escape by Git.
Lines with empty first two fields:
- Number of first line in a block of removed lines
- Number of lines in a block of removed lines
- Number of first line in a block of added lines
- Number of lines in a block of added lines