Commit Graph

32 Commits

Author SHA1 Message Date
Taylor Blau
bca03c562d commands,lfs,test: rename command to filter-process 2016-11-08 13:17:41 -07:00
Lars Schneider
03d44c9d79 install filter on upgrade 2016-11-08 15:27:06 +01:00
Lars Schneider
d874af9ac1 wip 2016-11-02 16:51:14 -06:00
Steve Streeting
87727a206b Automatically upgrade old filters instead of requiring —force
Also remove upgrade path for `git-media` since over-general and should
not be needed any more
2016-09-01 12:29:49 +01:00
Steve Streeting
5be442daea Add git lfs update --manual option & promote it on hook install fail 2016-04-26 12:04:55 +01:00
epriestley
fa2ec2fb70 Fix smudge/clean filters to work with filenames that have leading dashes
Fixes issue #1072. Currently, `git-lfs` installs filters which misinterpret
filenames with leading dashes as command line flags. Separate paths with a
double dash (`--`) when installing filters so these files are handled
properly.

The failing test now passes:

```
$ ./test/test-unusual-filenames.sh
...
test: push unusually named files ...                               OK
test: pull unusually named files ...                               OK
```
2016-03-17 14:46:18 -07:00
Kale Worsley
eef8c9b103 resmoves -> removes. 2015-10-02 08:44:28 +13:00
Rick Olson
8cd51c0086 rename the options to SKIP_SMUDGE and --skip-smudge 2015-09-23 13:43:04 -06:00
Rick Olson
f8715e5efc teach init about --smudge-passthrough 2015-09-23 12:20:30 -06:00
Rick Olson
82ac4ac7e3 teach init about --local flag 2015-09-23 11:58:16 -06:00
Taylor Blau
e56d63064c lfs/attribute, hook: rename Path to Section, nuke HookType type 2015-09-02 14:57:09 -04:00
Taylor Blau
3b9b0f2b7f lfs/setup, commands: revert Setup/Teardown to Install/Uninstall 2015-09-01 18:20:02 -04:00
Taylor Blau
0aba23980d lfs/filters+attributes: drop the Filter type for Attribute
The old `Filter` type represented a far too specific type of attribute.
Instead, a generic alternative called `Attribute` is favored, which more more
closely matches the type of structure defined in
http://git-scm.com/docs/gitattributes.
2015-09-01 18:20:01 -04:00
Taylor Blau
a046790829 lfs/setup: use git-lfs instead of git lfs to ensure tests pass 2015-09-01 18:19:37 -04:00
Taylor Blau
c7cb8e0303 lfs: promote Hooks and Filters to types
This commit introduces two new types into the API: Hook, and Filter.

Both `Hook` and `Filter` are abstractions built on Git hooks and filters
respectively. Each type knows how to install and uninstall itself. These
processes are utilized by the setup method in the `lfs` package, and the
appropriate calls have been updated in the init and uninit commands.

These abstractions were introduced to make adding/removing required filters and
hooks easier for future projects, including the migration away from the smudge
filter.

Eventually it seems appropriate to move both new types into the `git` package,
as opposed to the `lfs` package. At the time of writing this commit, there is
some coupling against state defined in the `lfs` package (i.e., whether or not
we're currently in a git repo, the local working directory, etc). At somepoint
it would be nice to remove that coupling and move these new types into the
`git` package.
2015-09-01 18:19:34 -04:00
rubyist
136a68fb89 NotInARepositoryError => IsInvalidRepoError() 2015-08-27 11:28:03 -04:00
Rick Olson
f6d96803a3 update pre-push to be more explicit about the path 2015-08-14 09:59:16 -06:00
Rick Olson
87b557d75b teach the upgrade command how to update pre-push hooks 2015-08-13 17:12:17 -06:00
Steve Streeting
3920ef5757 Pre-push hook must exit with a non-zero result when git-lfs isn't on the path
Otherwise the branch push will go ahead and data will be incomplete on the server
2015-08-13 10:27:36 +01:00
Rick Olson
eb03c46f48 teach 'uninit' how to remove git config sections 2015-07-27 16:21:53 -06:00
risk danger olson
6eaa77c5aa only remove pre-push if it's a known git lfs pre-push hook 2015-07-10 10:53:06 -06:00
risk danger olson
bf2691c8d6 add an uninit command 2015-07-10 10:43:20 -06:00
Rick Olson
be801148c5 add init --force 2015-07-06 17:10:47 -06:00
risk danger olson
296dddf704 Merge pull request #377 from bozaro/more-fast-filter
Remove unnecessary exec the process by filter wrapper
2015-06-10 09:26:29 -06:00
Artem V. Navrotskiy
ee0c877ab9 Remove unnecessary exec the process by filter wrapper
This change improve git-lfs performance on Windows
2015-06-10 16:40:07 +03:00
rubyist
b363c569bd Make the pre-push hook check that git-lfs exists first
If git-lfs does not exist (e.g. it has been uninstalled) the pre-push
hook should still exit cleanly so the push can continue. The script will
output a warning stating that the repo has been set up for Git LFS but
that it is not installed.
2015-05-27 11:43:06 -04:00
Rick Olson
216623196a Use goimports instead of gofmt 2015-05-13 13:43:41 -06:00
Michael Käufl
8890a099b5 Checked for err != nil instead of == nil
I needed some extra time to understand what was happening.  In my
opinion, the control flow is easier to follow when checking for
err != nil, as this is the convention in go.
2015-05-13 01:43:46 +02:00
Michael Käufl
1b04957416 Removed else after return 2015-05-13 01:40:15 +02:00
Rick Olson
394d7dbd91 teach the update command how to update known git lfs hooks 2015-04-24 11:33:22 -06:00
Michael Haggerty
0dd0e17964 pre-push hook: properly quote args that are passed along
Properly quote the arguments that are passed to `git lfs push --stdin`
just in case they contain any shell metacharacters.
2015-04-15 08:57:50 +02:00
Rick Olson
e37b695477 rename hawser => git-lfs 2015-03-19 13:30:55 -06:00