I checked git help hooks
and either it is impossible or I missed this.
I want this rather than pre-commit
as program in repository generates files, as result my current workflow is
git add -A
ruby script_stored_in_repository_that_generates_something.rb
<checking generated work that is not tracked in the repository>
git commit -m "what was changed"
and I want to eliminate manual script run as pointless.
I know I can use pre-commit
hook, but I prefer to edit work while code is staged rather than reverting/undoing/amending commits.