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:
parent
9cee5b43c2
commit
7272179979
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -24,4 +24,9 @@ OS: OSX 10.6.8
|
|||
|
||||
#### Please provide any additional information below.
|
||||
|
||||
|
||||
> This was the pre-commit hook, made it not run in direct mode. [[done]]
|
||||
>
|
||||
> However, it's normal to see typechanged files in direct mode, and many
|
||||
> git commands that manipulate files in the working tree *can* result in
|
||||
> data loss. This is documented on [[direct_mode]].
|
||||
> --[[Joey]]
|
||||
|
|
Loading…
Add table
Reference in a new issue