summary refs log tree commit diff
path: root/.config/git
diff options
context:
space:
mode:
Diffstat (limited to '.config/git')
-rw-r--r--.config/git/config21
1 files changed, 16 insertions, 5 deletions
diff --git a/.config/git/config b/.config/git/config
index 41bab58..5d542c2 100644
--- a/.config/git/config
+++ b/.config/git/config
@@ -43,18 +43,28 @@
     # Prevent showing files whose names contain non-ASCII symbols as unversioned.
     # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html
     precomposeunicode = false
-    filemode = false
+	filemode = false
 
     # enable coditional paging based on the amount of content
-    pager = "less -F -X"
+    ; pager = "less -F -X"
+    pager = "diff-highlight | less -FRX --tabs=4"
+	autocrlf = false
+	longpaths = true
 
 [init]
     defaultBranchName = master
     # templateDir = ~/.dotfiles/git/templates
 
+[interactive]
+    diffFilter="diff-highlight | less -FRX --tabs=4"
+
+[format]
+    signoff = true
+
 [commit]
-    # template = ~/.gitmessage
+    template = ~/.config/git/message
     gpgsign = true
+    signoff = true
     verbose = true
 
 [alias]
@@ -80,7 +90,6 @@
     lg = log -p
     g = grep --break --heading --line-number
     amend = commit --amend --reuse-message=HEAD --edit
-    contrib = shortlog --summary --numbered
     show-ignored = "! git clean -ndX | perl -pe 's/Would remove/Ignored:/'"
     # usage: change-date [rev] [date] [...additional filter-branch flags]
     # rewrites the commit/author date of <rev> to be <date>
@@ -95,7 +104,7 @@
     pr = "!f() { git fetch -fu ${2:-origin} refs/pull/${1:?missing pr num}/head:pr/$1 && git checkout pr/$1; }; f"
     total-lines = "! git ls-tree -r master --name-only | xargs -I {} git blame --line-porcelain {} | sed -n 's/^author //p' | sort | uniq -c | sort -rn"
     fixup = "!f() { git commit --fixup=${1}; }; f"
-    fix = fixup
+    fix = "!f() { git fixup ${1} && git ri ${1}^; }; f"
     squash = "!f() { git commit --squash=${1}; }; f"
     r = rebase
     ri = rebase --autostash --autosquash -i
@@ -119,6 +128,8 @@
     ; git-hack shortcuts
     hack = hack hack
     sync = hack sync
+    owners = "!f() { ref=\"$(git branch --format='%(upstream:short)'|head -n1)\"; git diff --name-only $ref | xargs -I{} git shortlog -nse $ref {} | sort -k2 | uniq -f2 | sed 's/^[ ]*//' | sort -gr | cut -f2; }; f"
+    reviewers = "!f() { ref=\"$(git branch --format='%(upstream:short)'|head -n1)\"; git diff --name-only $ref | xargs -I{} git shortlog -nse --group=trailer:reviewed-by $ref {} | sort -k2 | uniq -f2 | sed 's/^[ ]*//' | sort -gr | cut -f2; }; f"
 
 [apply]
     # Detect whitespace errors when applying a patch