consolidate git-churn into gitconfig
This commit is contained in:
@@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Written by Corey Haines
|
|
||||||
# Scriptified by Gary Bernhardt
|
|
||||||
#
|
|
||||||
# Put this anywhere on your $PATH (~/bin is recommended). Then git will see it
|
|
||||||
# and you'll be able to do `git churn`.
|
|
||||||
#
|
|
||||||
# Show churn for whole repo:
|
|
||||||
# $ git churn
|
|
||||||
#
|
|
||||||
# Show churn for specific directories:
|
|
||||||
# $ git churn app lib
|
|
||||||
#
|
|
||||||
# Show churn for a time range:
|
|
||||||
# $ git churn --since='1 month ago'
|
|
||||||
#
|
|
||||||
# (These are all standard arguments to `git log`.)
|
|
||||||
|
|
||||||
set -e
|
|
||||||
git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count\tfile"} {print $1 "\t" $2}' | sort -g
|
|
||||||
|
|
||||||
|
|
||||||
@@ -24,6 +24,10 @@
|
|||||||
day = "!sh -c 'git log --reverse --no-merges --branches=* --date=local --after=\"yesterday 11:59PM\" --author=\"`git config --get user.name`\"'"
|
day = "!sh -c 'git log --reverse --no-merges --branches=* --date=local --after=\"yesterday 11:59PM\" --author=\"`git config --get user.name`\"'"
|
||||||
|
|
||||||
# order files by number of commits, ascending
|
# order files by number of commits, ascending
|
||||||
|
# Written by Corey Haines
|
||||||
|
# Scriptified by Gary Bernhardt
|
||||||
|
# Show churn for a time range:
|
||||||
|
# $ git churn --since='1 month ago'
|
||||||
churn = "!f() { git log --all -M -C --name-only --format='format:' \"$@\" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print \"count\tfile\"} {print $1 \"\t\" $2}' | sort -g; }; f"
|
churn = "!f() { git log --all -M -C --name-only --format='format:' \"$@\" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print \"count\tfile\"} {print $1 \"\t\" $2}' | sort -g; }; f"
|
||||||
|
|
||||||
# show all deleted files in the repo
|
# show all deleted files in the repo
|
||||||
@@ -120,6 +124,7 @@
|
|||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
pager = less -FXRS -x2
|
pager = less -FXRS -x2
|
||||||
editor = vim
|
editor = vim
|
||||||
|
whitespace = cr-at-eol
|
||||||
[rerere]
|
[rerere]
|
||||||
enabled = true
|
enabled = true
|
||||||
[gitsh]
|
[gitsh]
|
||||||
|
|||||||
Reference in New Issue
Block a user