diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-26 14:15:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-26 14:15:45 -0400 |
commit | c38a32e5c36ad2998844bcfc601aef5280cd2973 (patch) | |
tree | 01cace35b7f5745d482669c5badcebb0837e1839 /Git | |
parent | 0f78a1c58ba2d4152b5671e0c055ef6f37f44425 (diff) | |
download | git-repair-c38a32e5c36ad2998844bcfc601aef5280cd2973.tar.gz |
fix skipping git hooks
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Destroyer.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Git/Destroyer.hs b/Git/Destroyer.hs index 955e313..06a8b4f 100644 --- a/Git/Destroyer.hs +++ b/Git/Destroyer.hs @@ -83,7 +83,7 @@ generateDamage = sample' (arbitrary :: Gen Damage) - (as long as the Repo contains the same files each time). -} applyDamage :: [Damage] -> Repo -> IO () applyDamage ds r = do - contents <- sort . filter (not . skipped . takeFileName) + contents <- sort . filter (not . skipped) <$> dirContentsRecursive (localGitDir r) forM_ ds $ \d -> do let withfile s a = do @@ -141,7 +141,7 @@ applyDamage ds r = do -- A broken .git/config is not recoverable. -- Don't damage hook scripts, to avoid running arbitrary code. ;) skipped f = or - [ f == "config" + [ takeFileName f == "config" , "hooks" `isPrefixOf` f ] |