nixos-23.05 #229

Merged
teutat3s merged 17 commits from nixos-23.05 into main 2023-06-28 17:31:27 +00:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit d28da2e1e6 - Show all commits

View file

@ -7,15 +7,15 @@ else
against=$(${git}/bin/git hash-object -t tree /dev/null) against=$(${git}/bin/git hash-object -t tree /dev/null)
fi fi
diff="git diff-index --name-only --cached $against --diff-filter d"
mapfile -t all_files < <($diff)
# Stash only unstaged changes, keeping staged changes # Stash only unstaged changes, keeping staged changes
old_stash=$(git rev-parse --quiet --verify refs/stash) old_stash=$(git rev-parse --quiet --verify refs/stash)
git stash push --quiet --keep-index -m 'Unstaged changes before pre-commit hook' git stash push --quiet --keep-index -m 'Unstaged changes before pre-commit hook'
new_stash=$(git rev-parse --quiet --verify refs/stash) new_stash=$(git rev-parse --quiet --verify refs/stash)
diff="git diff-index --name-only --cached $against --diff-filter d"
mapfile -t all_files < <($diff)
# Format staged files # Format staged files
if ((${#all_files[@]} != 0)); then if ((${#all_files[@]} != 0)); then
treefmt "${all_files[@]}" && treefmt "${all_files[@]}" &&

View file

@ -1,6 +1,7 @@
[formatter.nix] [formatter.nix]
command = "alejandra" command = "alejandra"
includes = ["*.nix"] includes = ["*.nix"]
excludes = ["pkgs/_sources/generated.nix"]
[formatter.prettier] [formatter.prettier]
command = "prettier" command = "prettier"