Commit Graph

3 Commits

Author SHA1 Message Date
Taylor Blau
c8d5320743 test: test core.hooksPath doesn't install to .git/ 2016-08-02 09:37:08 -06:00
Taylor Blau
47245efa38 test: s/preform/perfom/g 2016-08-02 09:35:51 -06:00
Taylor Blau
d56b5aa73a lfs/hook: teach lfs.Hook about core.hooksPath
This commit gives the `lfs.Hook` knowledge of the new `core.hooksPath`
configuration value that was introduce in Git 2.9.0.

When `core.HooksPath` is found in the Git configuration AND is supported (i.e.,
installed Git binary has a version greater than or equal to "2.9.0"), `git-lfs
install` will place new hooks in that directory. If the `core.hooksPath` is
specified, but the installed verison of Git does NOT support it, then it will
be ignored and installed in `.git/hooks` as per usual.

To test this behavior, two new shell tests were added:
  - One that runs on Git >= 2.9.0, and tests that `core.hooksPath` is respected
  - One that runs on Git < 2.9.0, and tests that `core.hooksPath` is ignored

Unfortunately, our current testing framework does not support skipping
individual tests, only skipping entire files, so two new shell test files were
added.

Resolves github/git-lfs#1407.
2016-08-01 15:47:54 -06:00