Once the repositories have been cloned and a mailmap has been added, the Gource log files can be generated.
The command to do this is gource --output-custom-log
This will output a log file containing a line per change, per file, sorted by date.
For instance, using the git
repository as an example, the log file will look something like this:
1112911993|Linus Torvalds|A|/Makefile
1112911993|Linus Torvalds|A|/README
1112911993|Linus Torvalds|A|/cache.h
1112911993|Linus Torvalds|A|/cat-file.c
1112911993|Linus Torvalds|A|/commit-tree.c
1112911993|Linus Torvalds|A|/init-db.c
1112911993|Linus Torvalds|A|/read-cache.c
1112911993|Linus Torvalds|A|/read-tree.c
1112911993|Linus Torvalds|A|/show-diff.c
1112911993|Linus Torvalds|A|/update-cache.c
1112911993|Linus Torvalds|A|/write-tree.c
1112912170|Linus Torvalds|M|/cat-file.c
1112912170|Linus Torvalds|M|/commit-tree.c
1112912170|Linus Torvalds|M|/init-db.c
1112912170|Linus Torvalds|M|/read-cache.c
...
1670287771|Junio C Hamano|M|/GIT-VERSION-GEN
1670387782|Ævar Arnfjörð Bjarmason|M|/.github/workflows/main.yml
1670387782|Ævar Arnfjörð Bjarmason|M|/ci/install-dependencies.sh
1670387782|Ævar Arnfjörð Bjarmason|M|/ci/lib.sh
1670454360|Ævar Arnfjörð Bjarmason|M|/.github/workflows/main.yml
1670454923|Johannes Schindelin|M|/.github/workflows/main.yml
1670456842|Ævar Arnfjörð Bjarmason|M|/.github/workflows/l10n.yml
1670456842|Ævar Arnfjörð Bjarmason|M|/.github/workflows/main.yml
1670560609|Johannes Schindelin|M|/Documentation/RelNotes/2.39.0.txt
1670581905|Victoria Dye|M|/sequencer.c
1670581905|Victoria Dye|M|/t/t3404-rebase-interactive.sh
1670631456|Matheus Tavares|M|/.mailmap
1670657536|Johannes Schindelin|M|/.github/workflows/main.yml
1670718768|Junio C Hamano|M|/Documentation/RelNotes/2.38.2.txt
1670718768|Junio C Hamano|M|/GIT-VERSION-GEN
As we do not want to generate these log files more than once, but we do want to use them as a source for other commands, we need to either place them in a separate directory together, or use prefix.
# Use a separate directory
gource --output-custom-log 'logs/full/repository-name.log' 'repos/repository-name'
# Or use a file prefix
gource --output-custom-log 'logs/full.repository-name.log' 'repos/repository-name'
Using either a for
loop the log files can be generated for all repositories in the repos/
directory:
for sDir in ./repos/*/;do
gource --output-custom-log "logs/full/$(basename "${sDir}").log" "${sDir}"
done
This will fill the logs/
directory quite nicely, but the logs will still need to be cleaned up and combined!