init .config git tracking

This commit is contained in:
Zhongheng Liu 2026-04-30 09:23:35 +02:00
commit 114c330966
151 changed files with 4688 additions and 0 deletions

View file

@ -0,0 +1,21 @@
# gtest: test a command against git staged changes.
#
# example usage:
# gtest make test
function gtest -d "test command on staged changes only"
# Stash working dir, keeping index changes.
git stash push -q --keep-index --include-untracked; or return
# Run test command against index changes only.
command $argv
set cmdstatus $status
# Return working dir and index to original state.
# Note: reset + restore is required to prevent merge conflicts
# when popping the stash.
git reset -q
git restore .
git stash pop -q --index; or return $status
return $cmdstatus
end