mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 23:11:44 +01:00
install: add pre-checkout hook
Fixes #1248 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -13,7 +13,11 @@ class TestInstall(TestDvc):
|
||||
ret = main(['install'])
|
||||
self.assertNotEqual(ret, 0)
|
||||
|
||||
self.assertTrue(os.path.isfile('.git/hooks/post-checkout'))
|
||||
def hook(name):
|
||||
return os.path.join('.git', 'hooks', name)
|
||||
|
||||
self.assertTrue(os.path.isfile(hook('post-checkout')))
|
||||
self.assertTrue(os.path.isfile(hook('pre-commit')))
|
||||
|
||||
self.dvc.add(self.FOO)
|
||||
os.unlink(self.FOO)
|
||||
|
||||
Reference in New Issue
Block a user