nix-dotfiles/programs/fish/functions/git_is_touched.fish
2023-11-19 19:03:46 -08:00

6 lines
321 B
Fish

git_is_worktree; and begin
# The first checks for staged changes, the second for unstaged ones.
# We put them in this order because checking staged changes is *fast*.
not command git diff-index --cached --quiet HEAD -- >/dev/null 2>&1
or not command git diff --no-ext-diff --quiet --exit-code >/dev/null 2>&1
end