Commit Graph

40 Commits

Author SHA1 Message Date
risk danger olson
8421b5c081 use grep, not ack 2016-08-16 12:08:37 -06:00
risk danger olson
33134e026e add happy path tests for push/pull/fetch 2016-08-15 15:11:05 -06:00
risk danger olson
ee140ddc54 extract larger fetch tests to separate files 2016-08-02 10:11:12 -06:00
risk danger olson
48822ade37 distinguish between empty include/exclude paths 2016-08-01 16:47:41 -06:00
Olivier Monnier
dfe39415bb Enhance fetch integration tests with sha1
Adding an integration test case to check that only
needed objects are fetched.

Signed-off-by: Olivier Monnier <olivier.monnier@intel.com>
2016-06-28 09:37:26 +02:00
Olivier Monnier
f86997f863 Fix 'git lfs fetch' with a sha1 ref
The commit 39676192da53261efd441ccf0c67c85a341ae1a1
introduced a regression in the capability to fetch a
sha1 ref.
The command 'git lfs fetch origin <sha1>' was returning
following error: 'Invalid ref argument: [<sha1>]'.

This is due to the fact that 'git rev-parse --symbolic-full-name <ref>'
returns an empty content if the ref is a sha1.

Signed-off-by: Olivier Monnier <olivier.monnier@intel.com>
2016-06-28 09:37:26 +02:00
Taylor Blau
fe1aa74f70 test/fetch: fix mising semi-colon in for-loop 2016-06-18 11:55:02 -06:00
Taylor Blau
303e2f08c6 test/fetch: test "fetch --all" using a --bare clone 2016-06-16 10:16:26 -06:00
Taylor Blau
9e0a30ae39 test: include fetch test for unclean paths 2016-06-01 14:49:58 -06:00
risk danger olson
dceb6611c7 guard against invalid remotes passed to git lfs push 2016-02-03 13:06:05 -07:00
risk danger olson
9c3307909b try a merge out 2015-11-09 10:46:29 -07:00
risk danger olson
4915979d5a Merge pull request #734 from sinbad/fetch-return-code
Make fetch return error code when 1+ downloads failed
2015-10-20 09:22:41 -06:00
Steve Streeting
97434feb55 Implement fetch --prune + test 2015-10-15 16:35:26 +01:00
Steve Streeting
32f56cd652 Make fetch return non-zero error code when some downloads failed 2015-10-13 15:29:25 +01:00
Steve Streeting
1997c7479f Test for friendly fail case when default remote cannot be established 2015-10-06 17:40:05 +01:00
Steve Streeting
28e6f2821d Implement improved DefaultRemote() method with better defaults & errors 2015-10-06 17:27:36 +01:00
rick
54601c6d34 introduce calc_oid() helper for integration tests 2015-09-21 11:50:22 -06:00
rick
f6d1f99316 skip these tests if GIT_LFS_TEST_DIR is unset 2015-09-08 14:12:51 -06:00
rick
4174867802 test the exit code of the commands 2015-09-08 10:20:52 -06:00
rick
43e9f379ce fix behavior of 7 commands when run outside git repo 2015-09-08 09:29:53 -06:00
Steve Streeting
799ee1e534 Test for fetch --all 2015-09-07 15:45:03 +01:00
Steve Streeting
7519896f98 Change default fetch recent to include remote refs from current remote
Previously only local branches were included by default. However this
way is more useful in practice; otherwise when you needed to checkout
or pull new commits from the remote you were forced to fetch on demand;
fetch --recent wouldn't pick them up without including the remote
branches. While you *can* create / update local branches without
checking out manually (e.g. git reset to manually fast-forward) to make
fetch --recent then pickup the changes from local branches, it's
too cumbersome. Including remote refs by default makes more sense for
most people, respecting the idea that you do this as an optimistic fetch
to save time at checkout/pull. However, limit the operation to the
current remote only (which makes sense anyway).
2015-09-01 12:37:24 +01:00
Steve Streeting
8cf2be78cf Add an additional test to prove that fetch does snapshot unchanged files
Because we changed fetch command to use --no-walk, prove that files which
were not changed at that ref but had state from previous commits are
included, i.e. that the fetch is a complete snapshot of the state at
that ref.
2015-08-28 16:09:22 +01:00
Steve Streeting
3c62a2a399 Add tests for fetch --recent with remote branches 2015-08-27 17:09:40 +01:00
Steve Streeting
88b362c352 Tests for fetch --recent 2015-08-27 15:31:58 +01:00
Steve Streeting
111e674d38 First fetch --recent integration test 2015-08-26 16:23:09 +01:00
Steve Streeting
bcc14cf55b Push now works properly for other branches 2015-08-26 14:41:59 +01:00
Steve Streeting
aba8f6dd10 Real fetch test - currently failing because of https://github.com/github/git-lfs/issues/606 2015-08-25 16:57:28 +01:00
Steve Streeting
3d2ed18230 More representative example of feeding JSON into lfstest-testutils 2015-08-25 10:57:45 +01:00
Steve Streeting
2fa44e06d5 Create lfstest-testutils tool to create more complex test cases easily in shell
Right now can create commits using JSON version of []*test.CommitInput
2015-08-24 17:54:56 +01:00
Steve Streeting
b5df63c071 Add optional remote arg to fetch & pull, and default to tracking remote
The first arg to fetch & pull is now a remote. In addition, the default
remote if you don't specify is now the tracking remote as in `git pull`
if it exists, and origin if that's not set. This makes it more consistent
with the underlying git workflow especially in triangular fork setups.
2015-08-13 17:22:29 +01:00
Steve Streeting
451b03edf9 Adding --include and --exclude args to fetch/pull 2015-08-10 17:00:10 +01:00
Steve Streeting
4675404f33 Add lfs.fetchinclude and lfs.fetchexclude gitconfig options
These include or exclude lists of paths (matching as per gitignore) in
the fetch to optimise downloading.
2015-08-10 17:00:10 +01:00
Steve Streeting
5e654f23a3 Fetch tests should be checking that content exists, not pointer exists
assert_pointer only checked that a pointer existed, not that the content was present. Add assert_local_object and refute_local_object to test helpers
2015-08-06 12:12:58 +01:00
risk danger olson
bcf15d9ce9 Merge pull request #540 from github/fix-test-race-condition
Fix test race condition
2015-07-30 08:43:55 -06:00
Steve Streeting
dbf4a8be0c Support multiple refs in fetch command 2015-07-30 10:03:21 +01:00
Rick Olson
202ae122d4 update the shebang lines to use bash 2015-07-29 20:37:31 -06:00
Steve Streeting
f55d805cd0 Fix fetch test, only downloads now, doesn't check out 2015-07-24 15:07:51 +01:00
Rick Olson
9928f733a8 implement refute_server_object and assert_server_object 2015-07-06 12:19:18 -06:00
rubyist
048630500d Fix race condition in fetch, add integration tests 2015-06-20 12:10:54 -04:00