Commit Graph

16 Commits

Author SHA1 Message Date
risk danger olson
3c8e64394f commands: remove 'matched query' msg 2017-02-23 13:02:42 -07:00
risk danger olson
d68344f07d test: assert local lock creation by parsing --json output 2017-02-23 12:47:14 -07:00
risk danger olson
f27e27a0a7 test: introduce get_lock_id() helper 2017-02-17 10:59:45 -07:00
risk danger olson
99c3b4df8d commands: allow lock commands to be used without env flag 2017-02-15 11:11:23 -07:00
risk danger olson
f0d9be4684 locking: rename 'committer' to 'owner' 2017-02-03 10:48:31 -07:00
risk danger olson
986754ff30 test: remove the unnecessary 'remote_' prefix that setup_remote_repo_with_file() adds 2017-01-31 17:03:21 -07:00
risk danger olson
15e2728d65 test: track locks per-repo 2017-01-31 16:55:31 -07:00
Taylor Blau
7a42d46a09 locking: use *Committer to implement fmt.Stringer 2017-01-19 14:52:19 -07:00
Taylor Blau
50ce12b4ee test/locks: update lock assertions to include missing reponame 2017-01-06 09:15:16 -07:00
Taylor Blau
e39e8ae4af Merge pull request #1814 from git-lfs/locking-json
locking: add `--json` flag
2017-01-05 11:18:53 -07:00
Taylor Blau
51c35df315 test: add repo argument to assert_server_lock 2016-12-28 17:11:24 -07:00
Taylor Blau
087ed31c7a test: add git lfs locks --json test 2016-12-27 17:18:53 -07:00
Steve Streeting
f71598bc20 Add test for cached locks, fix cached locks 2016-12-12 14:56:40 +00:00
Taylor Blau
36b0664fe0 commands/test: make lock commands opt-in using GITLFSLOCKSENABLED=1
To prepare for the upcoming release of Git LFS v1.3, the `git-lfs lock` and
`git-lfs locks` commands are now hidden behind a enviornment variable
`GITLFSLOCKSENABLED`. Since most (all?) implementations of LFS do not yet
support this new locking API, it makes sense to allow users to experiment with
the command while at the same time, not making it a "full" part of the release.

If users wish to run any `git-lfs lock{,s}` command, they may do so according
to the following:

```
$ GITLFSLOCKSEANBLED=1 git lfs lock <flags> [args]
$ GITLFSLOCKSEANBLED=1 git lfs locks <flags> [args]
```

This commit, when applied, adds two new things:

1. The `isCommandEnabled(cmd string) bool` func in the commands package. This
   new func checks the OS's enviornment variables and determines whether or not
   a command is "enabled".

2. Updates the `lock` and `locks` tests to use the
   GITLFSLOCKSENABLED=1 flag such that they are able to run.

Since the `isCommandEnabled` func defaults to "false", it should only guard
commands which are deemed "experimental", as noted in the godoc.
2016-07-21 10:07:06 -06:00
Taylor Blau
31e5ed01c8 test/locks: qualify with --path 2016-06-03 17:27:44 -06:00
Taylor Blau
4d8e539837 test: test the git lfs locks command 2016-06-03 17:24:38 -06:00