You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a check that stops committing a zettel if there is no output in git diff (i.e. there were no changes between the recent version). This is good when I just enter and exit (with pyzet edit) an already committed zettel without adding a thing.
But when pre-commit rejects committing a zettel, it is already staged. So, if I enter and exit the zettel with pyzet edit it won't be committed.
I see a solution in checking for git diff --staged if git diff is empty. This should also check for this edge case. Another solution is to unstage zettel when pre-commit rejects it, but it's probably harder to implement. IDK at this point, and will decide later.
The text was updated successfully, but these errors were encountered:
There is a check that stops committing a zettel if there is no output in
git diff
(i.e. there were no changes between the recent version). This is good when I just enter and exit (withpyzet edit
) an already committed zettel without adding a thing.But when pre-commit rejects committing a zettel, it is already staged. So, if I enter and exit the zettel with
pyzet edit
it won't be committed.I see a solution in checking for
git diff --staged
ifgit diff
is empty. This should also check for this edge case. Another solution is to unstage zettel when pre-commit rejects it, but it's probably harder to implement. IDK at this point, and will decide later.The text was updated successfully, but these errors were encountered: