Commit Graph

12 Commits

Author SHA1 Message Date
Steve Streeting
d60368c8b4 Use template style replacements in hooks
Still using strings.Replace, this doesn’t justify using text/template
2017-01-11 11:12:31 +00:00
Steve Streeting
f7e3ced9bf Generalise hook setup so common parts can be re-used 2017-01-02 13:02:00 +00:00
risk danger olson
bba8f3b876 update package imports 2016-11-15 10:01:18 -07:00
risk danger olson
69acb28d61 lean into pkg/errors philosophy on wrappin' 2016-08-18 15:24:11 -06:00
risk danger olson
2473068345 rename errutil to errors 2016-08-18 14:20:33 -06:00
risk danger olson
d3bc59abd5 replace .GitConfig* with .Git.* 2016-08-15 15:43:38 -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
Steve Streeting
ab1af11720 Refactor errors and credentials into own packages to break cycles 2016-05-16 15:06:02 +01:00
Steve Streeting
c4bbd3724e Major refactor to pull things into config, httputil, tools
Mainly required to avoid cyclical dependencies when separating other things
2016-05-13 17:38:06 +01:00
Steve Streeting
6b3629e95f Replace blank hooks without warning 2016-04-25 14:52:45 +01:00
rick
be6cc73102 teach 'update' cmd how to install hooks in bare repos 2015-09-17 16:26:02 -06:00
Taylor Blau
e56d63064c lfs/attribute, hook: rename Path to Section, nuke HookType type 2015-09-02 14:57:09 -04:00