actions icon indicating copy to clipboard operation
actions copied to clipboard

Dev: unstaged changes end up in commit in dist/ and lib/

Open andreasabel opened this issue 2 years ago • 0 comments

I noticed that if I create or amend a commit while I also have unstaged changes, these will end up against intention in the auto-generated dist/ and lib/ parts of the commit.

https://github.com/haskell/actions/blob/1c618fb42f876960599b42b9d385fc7af930cafb/setup/.lintstagedrc.js#L1-L9

Maybe a fix would be to auto-stash in the commit hook, so that the unstaged changes would not be considered when compiling the typescript. Presumably git stash --keep-index can do this (?): https://stackoverflow.com/questions/20028507/git-stash-uncached-how-to-put-away-all-unstaged-changes

andreasabel avatar May 06 '23 08:05 andreasabel