avoid running pre-commit hook in direct mode

The code that handles committing unlocked files in indirect mode did
something unexpected and data lossy.
This commit is contained in:
Joey Hess 2013-01-17 14:11:01 -04:00
parent 9cee5b43c2
commit 7272179979
2 changed files with 7 additions and 2 deletions

View file

@ -20,7 +20,7 @@ def = [command "pre-commit" paramPaths seek "run by git pre-commit hook"]
seek :: [CommandSeek]
seek =
[ whenNotDirect $ withFilesToBeCommitted $ whenAnnexed $ Command.Fix.start
, withFilesUnlockedToBeCommitted start]
, whenNotDirect $ withFilesUnlockedToBeCommitted start]
start :: FilePath -> CommandStart
start file = next $ perform file