mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 11:06:41 +00:00
Add new git-log-list-files executable
This commit is contained in:
20
bin/git-log-list-files
Executable file
20
bin/git-log-list-files
Executable file
@@ -0,0 +1,20 @@
|
||||
#! /usr/bin/env bash
|
||||
set -e
|
||||
|
||||
main() {
|
||||
local ref="$1"
|
||||
local commits
|
||||
local files
|
||||
|
||||
[ -z "$ref" ] && ref="HEAD"
|
||||
commits="$(git rev-list "$ref")"
|
||||
|
||||
for commit in $commits; do
|
||||
files="$(git diff-tree --no-commit-id --name-only -r $commit)"
|
||||
for file in $files; do
|
||||
echo "${commit}: $file"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user