[user]
	name = Ron Shavit
	email = me@ronshavit.com

[sendemail]
    smtpserver = smtp.fastmail.com
    smtpuser = me@ronshavit.com
    smtpencryption = ssl
    smtpserverport = 465
    annotate = true

[include]
    path = ~/.gitconfig.local

[credential]
    helper = cache --timeout 3600
    helper = !type pass-git-helper >/dev/null && pass-git-helper $@

[credential "https://github.com"]
	helper = !/opt/homebrew/bin/gh auth git-credential

[credential "https://gist.github.com"]
	helper = !/opt/homebrew/bin/gh auth git-credential

[init]
	defaultBranch = trunk

[help]
	autocorrect = prompt

[commit]
	verbose = true
	; gpgSign = true # don't sign commits by default, it's annoying

[fetch]
	prune = true
	pruneTags = true
	all = true

[pull]
	rebase = true

[push]
	default = simple
	autoSetupRemote = true
	followTags = true

[rebase]
	autoSquash = true
	autoStash = true
	updateRefs = true

[rerere]
	enabled = true
	autoupdate = true

[merge]
	conflictstyle = zdiff3
	tool = diffview

[mergetool]
	prompt = false
	keepBackup = false

[mergetool "diffview"]
	cmd = nvim -n  -c "DiffviewOpen" "$MERGE"

[diff]
	colorMoved = true
	algorithm = histogram
	context = 3
	interHunkContext = 10
	ignoreSubmodules = dirty
	mnemonicPrefix = true
	renames = true

[maintenance]
	repo = /home/ron/dev/jin

[core]
	compression = 9 # trade cpu for disk space & network speed
	preloadindex = true
	fsmonitor = true
	untrackedCache = true
	editor = nvim
	pager = delta
	autocrlf = input
	whitespace = error

[color]
	ui = true

[column]
	ui = auto

[branch]
	sort = -committerdate

[tag]
	sort = version:refname

[advice]
	addEmptyPathspec = false
	pushNonFastForward = false
	statusHints = false

[blame]
	coloring = highlightRecent
	date = relative

[log]
	abbrevCommit = true
	graphColors = blue,yellow,cyan,magenta,green,red

[interactive]
	diffFilter = delta --color-only
	singleKey = true

[delta]
	true-color = always
	syntax-theme = zenburn

	features = decorations
	whitespace-error-style = 22 reverse
	tabs = 2
	line-numbers = true
	navigate = true    # use n and N to move between diff sections
	hyperlinks = true
	light = false
	dark = true

	file-style                    = blue
	minus-style                   = syntax "#43242B"
	minus-non-emph-style          = syntax "#43242B"
	minus-emph-style              = "#1F1F28" "#C34043"
	minus-empty-line-marker-style = normal "#43242B"
	zero-style                    = syntax
	plus-style                    = syntax "#2B3328"
	plus-non-emph-style           = syntax "#2B3328"
	plus-emph-style               = "#1F1F28" "#76946A"
	plus-empty-line-marker-style  = normal "#2B3328"
	line-numbers-plus-style       = green
	line-numbers-minus-style      = red
	line-numbers-left-format      = "{nm:>4}┊"
	line-numbers-right-format     = "{np:>4}┊"
	line-numbers-left-style       = red
	line-numbers-right-style      = green

[delta "decorations"]
	commit-decoration-style = normal box ul
	file-style = normal ul
	file-decoration-style = normal box
	hunk-header-decoration-style = normal box ul

[color "blame"]
    highlightRecent = black bold,1 year ago,white,1 month ago,default,7 days ago,blue

[color "branch"]
    current  = magenta
    local    = default
    remote   = yellow
    upstream = green
    plain    = blue

[alias]
	st = status
	co = checkout
	br = branch
	ci = commit
	df = diff
	lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
	current-branch = rev-parse --abbrev-ref HEAD
[filter "lfs"]
	clean = git-lfs clean -- %f
	smudge = git-lfs smudge -- %f
	process = git-lfs filter-process
	required = true
