[user]
    email = acdw@acdw.net
    name = Case Duckworth

[init]
    defaultBranch = main

[push]
    default = simple

[pull]
    rebase = false

[core]
    editor = emacsclient
    precomposeunicode = true
    pager = less
    autocrlf = false
    eol = lf

[merge]
    conflictstyle = diff3
    tool = vimdiff

[alias]
    # Easier locations
    root = rev-parse --show-toplevel
    current-branch = rev-parse --abbrev-ref HEAD
    # Easier listing and info
    branches = branch -a
    tags = tag -l
    stashes = stash list
    remotes = remote -v
    staged = diff --cached
    graph = log --graph -10 --branches --remotes --tags --format=format:'%Cgreen%h %Creset: %<(75,trunc)%s (%cN, %cr) %Cred%d' --date-order
    precommit = diff --cached --diff-algorithm=minimal -w
    # Easier actions
    discard = checkout --
    uncommit = reset --soft HEAD^
    unstage = reset HEAD --
    amend = commit --amend
    pushall = !git remote | xargs -L1 git push --all
    # Shortened commonalities
    st = status -bs
    ac = !git add . && git commit -m

# diffing
[diff "lisp"]
    xfuncname = "^(\\(.*)$"
[diff "org"]
    xfuncname = "^(\\*+.*)$"

; [credential]
;	helper = /home/case/.local/bin/pass-git-helper
;	useHttpPath = true

[bash]
    showUntrackedFiles = true
    showDirtyState = true

[sendemail]
    smtpserver = smtp.fastmail.com
    smtpuser = acdw@fastmail.com
    smtpencryption = tls
    smtpserverport = 465

# Better urls
[url "https://github.com/"]
    insteadOf = "gh:"
[url "git@github.com:"]
    pushInsteadOf = "gh:"
[github]
    user = duckwork

[url "https://gitlab.com/"]
    insteadOf = "gl:"
[url "git@gitlab.com:"]
    pushInsteadOf = "gl:"
[gitlab]
    user = acdw

[url "https://git.sr.ht/"]
    insteadOf = "sr:"
[url "git@git.sr.ht:"]
    pushInsteadOf = "sr:"

[url "https://tildegit.org/"]
    insteadOf = "tg:"
[url "git@tildegit.org:"]
    pushInsteadOf = "tg:"
[gitea "tildegit.org/api/v1"]
    user = acdw