mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-26 05:04:34 +00:00
Add git tracked-text-files alias
This commit is contained in:
parent
82ab38ae7f
commit
0e0dd92bb9
|
@ -71,7 +71,8 @@
|
||||||
show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"
|
show-merge = "!sh -c 'merge=$(git find-merge $0 $1) && [ -n \"$merge\" ] && git show $merge'"
|
||||||
|
|
||||||
tracked-files = "ls-tree --full-tree --name-only -r HEAD"
|
tracked-files = "ls-tree --full-tree --name-only -r HEAD"
|
||||||
total-lines = "!git tracked-files | xargs cat | wc -l"
|
tracked-text-files = "!git tracked-files | while IFS= read -r file; do mime_type=$(file -b --mime-type "$file"); [[ $mime_type == text/* ]] && echo "$file"; done"
|
||||||
|
total-lines = "!git tracked-text-files | xargs cat | wc -l"
|
||||||
total-files = "!git tracked-files | wc -l"
|
total-files = "!git tracked-files | wc -l"
|
||||||
total-commits = "!git log --oneline | wc -l"
|
total-commits = "!git log --oneline | wc -l"
|
||||||
comitter-lines = "!git log --author=\"$1\" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf \"added lines: %s, removed lines: %s, total lines: %s\\n\", add, subs, loc }' #"
|
comitter-lines = "!git log --author=\"$1\" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf \"added lines: %s, removed lines: %s, total lines: %s\\n\", add, subs, loc }' #"
|
||||||
|
|
Loading…
Reference in a new issue