1 { pkgs, lib, config, ... }:
10 ignores = [ "*~" "*.swp" ];
11 package = pkgs.gitFull;
14 authors = "shortlog -s -n";
15 bl = "git log -p -M --follow --stat --";
18 ca = "commit --amend -C@";
19 cf = "commit --fixup";
23 dh = "diff --histogram";
24 dp = "diff --patience";
25 ign = "ls-files -o -i --exclude-standard";
26 ll = "log --graph --decorate --pretty=oneline --abbrev-commit";
29 spull = "!git-svn fetch && git-svn rebase";
30 spush = "!git-svn dcommit";
34 fetch-local = "!git fetch local && git tag -d $(git describe --exact-match 2>/dev/null >/dev/null) && git fetch --tags local";
35 pull-local = "!git fetch-local && git checkout -B master local/master";
36 pull-local-old = "!git fetch-local && git checkout HEAD'^' && git branch -f master local/master && git checkout master";
37 root = ''!git rev-list --parents HEAD | egrep "^[a-f0-9]{40}$"'';
38 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]\\(\\^{}\\)\\?\"'';
39 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"'';
40 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]\\(\\^{}\\)\\?\"'';
41 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"'';
42 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"'';
43 cl = "notes --ref=changelog append";
44 cl-bug = "notes --ref=changelogs/bugs append";
45 cl-feature = "notes --ref=changelogs/features append";
46 wip = "for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads";
49 push.default = "simple";
51 #color.diff.whitespace = "red reverse";
52 color.status = "auto";
53 color.branch = "auto";
54 core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
55 core.quotepath = "false";
56 diff.algorithm = "histogram";
57 diff.sqldiff.command = "sqldiff";
58 format.pretty = "oneline";
59 init.defaultBranch = "main";
60 web.browser = "elinks";
61 browser.elinks.cmd = "elinks";
62 sendemail.chainReplyTo = "false";
63 sendemail.composeencoding = "UTF-8";
64 sendemail.confirm = "always";
65 sendemail.envelopeSender = "auto";
66 sendemail.multiedit = "yes";
67 sendemail.suppresscc = "self";
68 sendemail.suppressFrom = "false";
69 sendemail.thread = "true";
70 sendemail.validate = "true";
71 merge.tool = "vimdiff";
74 rebase.autosquash = "true";