1 { pkgs, lib, config, ... }:
4 ignores = [ "*~" "*.swp" ];
5 package = lib.mkDefault pkgs.gitFull;
7 authors = "shortlog -s -n";
10 push.default = "simple";
12 #color.diff.whitespace = "red reverse";
13 color.status = "auto";
14 color.branch = "auto";
15 core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
16 core.quotepath = "false";
17 alias.s = "status -s";
21 alias.co = "checkout";
22 alias.dc = "diff --cached";
24 alias.dh = "diff --histogram";
25 alias.dp = "diff --patience";
27 alias.ll = "log --graph --decorate --pretty=oneline --abbrev-commit";
28 alias.ign = "ls-files -o -i --exclude-standard";
29 alias.spull = "!git-svn fetch && git-svn rebase";
30 alias.spush = "!git-svn dcommit";
31 alias.fetch-local = "!git fetch local && git tag -d $(git describe --exact-match 2>/dev/null >/dev/null) && git fetch --tags local";
32 alias.pull-local = "!git fetch-local && git checkout -B master local/master";
33 alias.pull-local-old = "!git fetch-local && git checkout HEAD'^' && git branch -f master local/master && git checkout master";
34 alias.root = ''!git rev-list --parents HEAD | egrep "^[a-f0-9]{40}$"'';
35 alias.has-tag-version = ''!git show-ref --tags -d | grep -qx \"^$(git rev-parse HEAD) refs/tags/v[0-9][0-9][0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\(\\^{}\\)\\?\"'';
36 alias.tag-version = ''"!git has-tag-version && return; v=$(TZ=UTC date +v%Y-%m-%d) && name=$(git rev-parse --show-toplevel | sed -e 's:^.*/work::') && set -x && git tag -s -m \"$name $v\" $v"'';
37 alias.has-tag-majordate = ''!git show-ref --tags -d | grep -qx \"^$(git rev-parse HEAD) refs/tags/v[0-9]\\+.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\\(\\^{}\\)\\?\"'';
38 alias.tag-majordate = ''"!git has-tag-majordate && return; name=$(basename $(dirname $(git rev-parse --show-toplevel))); major=$(basename $(git rev-parse --show-toplevel)); version=''${version:-$(TZ=UTC date +\"v$major.%Y%m%d\")} && set -x && git tag -s -m \"$name $version\" $version"'';
39 alias.tag-cabal = ''"!set -x; for cabal in $(git ls-files | grep '.*\\.cabal$'); do name=$(sed -ne 's/^name: *\\(.*\\)/\\1/p' \"$cabal\"); version=$(sed -ne 's/^version: *\\(.*\\)/\\1/p' \"$cabal\"); git tag --merged | grep -Fqx \"$name-$version\" || git tag -f -s -m \"$name v$version\" $name-$version; done"'';
40 alias.cl = "notes --ref=changelog append";
41 alias.cl-bug = "notes --ref=changelogs/bugs append";
42 alias.cl-feature = "notes --ref=changelogs/features append";
43 alias.wip = "for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads";
44 diff.algorithm = "histogram";
45 diff.sqldiff.command = "sqldiff";
46 format.pretty = "oneline";
47 web.browser = "elinks";
48 browser.elinks.cmd = "elinks";
49 sendemail.chainreplyto = "false";
50 sendemail.composeencoding = "UTF-8";
51 sendemail.confirm = "always";
52 sendemail.envelopesender = "auto";
53 sendemail.multiedit = "yes";
54 sendemail.suppressfrom = "false";
55 sendemail.thread = "true";
56 sendemail.validate = "true";
57 merge.tool = "vimdiff";
60 rebase.autosquash = "true";