Carlos Martín Nieto
1ffd0806f4
remote: add resfpec list accessors
...
Bring back a way of acessing the git_refspec* from a remote.
Closes #1514
2013-04-30 12:04:59 +02:00
Carlos Martín Nieto
d84884571d
remote: dwim the refspecs according to the remote's advertised refs
...
As git allows you to store shorthand refspecs in the configuration, we
need to do this ourselves.
2013-04-28 18:49:51 +02:00
Carlos Martín Nieto
528a4e24c6
Parse shorthand refspecs as valid
...
Relax the ONELEVEL ref naming rules so the refspec parsing code can
ask for 'master' to be considered valid.
2013-04-28 14:21:10 +02:00
Carlos Martín Nieto
1be680c4d0
refspec: unify the string and parsed data
...
It used to be separate as an attempt to make the querying easier, but
it didn't work out that way, so put all the data together.
Add git_refspec_string() as well to get the original string, which is
now stored alongside the independent parts.
2013-04-20 19:45:40 +02:00
Carlos Martín Nieto
bc6374eac4
remote: allow querying for refspecs
...
Introduce git_remote_{fetch,push}_refspecs() to get a list of refspecs
from the remote and rename the refspec-adding functions to a less
silly name.
Use this instead of the vector index hacks in the tests.
2013-04-20 19:45:40 +02:00
Carlos Martín Nieto
4330ab26b5
remote: handle multiple refspecs
...
A remote can have a multitude of refspecs. Up to now our git_remote's
have supported a single one for each fetch and push out of simplicity
to get something working.
Let the remotes and internal code know about multiple remotes and get
the tests passing with them.
Instead of setting a refspec, the external users can clear all and add
refspecs. This should be enough for most uses, though we're still
missing a querying function.
2013-04-20 17:54:13 +02:00
nulltoken
24cb87e2a6
tag: Fix parsing when no tagger nor message
2013-03-31 14:36:51 +02:00
Russell Belfer
3ba0136243
Update cl_assert_equal_sz to be nicer
...
This makes the size_t comparison test nicer (assuming that the
values are actually not using the full length), and converts
some cases that were using it for pointer comparison to use the
macro that is designed for pointer comparison.
2013-03-22 14:23:38 -07:00
Edward Thomson
4cc326e9dd
remote push test fix
2013-03-05 22:45:26 -06:00
Russell Belfer
9c258af094
Merge pull request #1316 from ben/clone-cancel
...
Allow network operations to cancel
2013-02-12 10:13:56 -08:00
nulltoken
2bca5b679b
remote: Introduce git_remote_is_valid_name()
...
Fix libgit2/libgit2sharp#318
2013-02-11 23:19:41 +01:00
nulltoken
624924e876
remote: reorganize tests
2013-02-11 23:19:39 +01:00
Jameson Miller
db4bb4158f
Teach refspec to transform destination reference to source reference
2013-02-11 11:36:28 -05:00
Ben Straub
fe95ac1b67
Allow progress callback to cancel fetch
...
This works by having the indexer watch the return
code of the callback, so will only take effect
on object boundaries.
2013-02-05 10:59:58 -08:00
Ben Straub
cd74cbba18
Plug test leaks
2013-01-31 14:38:22 -08:00
Ben Straub
cf7038a65c
Enhance url parsing to include passwords
2013-01-31 14:04:21 -08:00
Ben Straub
7602cb7c0e
Add user-from-url param to auth callback
2013-01-31 10:44:57 -08:00
Vicent Martí
4adb4815bf
Merge pull request #1278 from sba1/cl-assert-equal-s
...
Use cl_assert_equal_s() instead of strcmp().
2013-01-25 20:37:39 -08:00
Philip Kelley
cfc39f5078
Fix 3 memory leaks
2013-01-25 22:43:52 -05:00
Sebastian Bauer
a7f8065f8c
Use cl_assert_equal_s() instead of strcmp().
...
Replaced all cl_assert(!strcmp()) or semantically equivalent forms
by cl_assert_equal_s().
2013-01-25 06:55:56 +01:00
Sebastian Bauer
b90eb84ff9
Test that pushs properly fail for transports that don't provide a push implementation.
2013-01-17 22:32:37 +01:00
Carlos Martín Nieto
2086e1baef
tests: plug a couple of leaks
2013-01-11 16:54:57 +01:00
Ben Straub
520dcc1c00
Move credential helpers to their own (optional) header
2013-01-09 13:31:17 -08:00
Ben Straub
ffb02b1630
Expose stock user/pass credential utility
2013-01-09 13:31:17 -08:00
Vicent Marti
7b51d675e8
Even more cleanups
2013-01-03 19:17:07 +01:00
Ben Straub
600d8dbf6d
Move test cleanup into cleanup functions
2013-01-03 09:10:38 -08:00
Ben Straub
6fef1ab344
Tests should clean up after themselves
2013-01-03 07:47:51 -08:00
Vicent Marti
7761ce2162
Merge branch 'development' into clar2
...
Conflicts:
tests-clar/clone/nonetwork.c
tests-clar/online/clone.c
tests-clar/online/fetchhead.c
2013-01-03 04:24:12 +01:00
Ben Straub
0642c1431e
Move url
to last place in parameter list
2013-01-02 12:44:47 -08:00
Vicent Marti
156cfec096
Cleanup Clar to make it SIMPLER
2013-01-02 02:05:11 +01:00
nulltoken
19c3c99ca8
remote: remove duplicated test
2012-12-24 18:18:40 +01:00
nulltoken
f19304d265
remote: Prevent create() from blindly overwriting
2012-12-24 18:18:31 +01:00
nulltoken
b0aa14aa3c
remote: Enhance in-memory remote test coverage
2012-12-24 16:54:27 +01:00
Ben Straub
2808ec9ab4
Rename test to make @nulltoken happy
2012-12-21 13:15:37 -08:00
Ben Straub
79000951ec
In-memory remotes don't have names
2012-12-21 08:05:59 -08:00
Ben Straub
874dcb25eb
Remote: deprecate dangling, prevent saving in-memory
2012-12-20 12:01:13 -08:00
Ben Straub
29f27599ea
Rename remote creation APIs
...
git_remote_add -> git_remote_create
git_remote_new -> git_remote_create_inmemory
2012-12-20 10:52:57 -08:00
Ben Straub
b412d56389
Add more clone options. Push test suite segfaults.
2012-12-19 17:02:06 -08:00
Sascha Cunz
d5cf4665a9
Fix some leaks and (possibly) dangling pointers in tests
...
Also adds some asserts.
2012-12-19 08:04:31 +01:00
Sascha Cunz
26290cd13b
Reset global variable to NULL after free'ing resource
2012-12-18 19:52:37 +01:00
Ben Straub
c4e3e797d1
Ensure static variables are nulled after every test
2012-12-16 12:27:11 -08:00
Ben Straub
b9e7e2b4e1
Move non-options back out of options struct
2012-12-14 13:46:45 -08:00
Ben Straub
18b2d560d3
Deploy git_clone_options; remove git_clone_bare
2012-12-14 13:03:59 -08:00
Ben Straub
7c353afd0e
Define constant for default fetch spec
2012-12-13 08:47:29 -08:00
Ben Straub
44f36f6e3b
Convert clone to use dangling remotes
2012-12-12 19:48:44 -08:00
Ben Straub
b914e17d82
API to set a dangling remote's repository
2012-12-12 12:23:24 -08:00
Ben Straub
a71c27ccda
Allow creation of dangling remotes
2012-12-12 12:15:25 -08:00
Ben Straub
59bccf33c4
Add a payload param to git_cred_acquire_cb
...
Fixes #1128 .
2012-12-10 11:11:01 -08:00
Vicent Marti
a9c07c47ea
tests: MSVC fix
2012-12-05 21:06:54 +01:00
Vicent Martí
e05ca13f1f
Merge pull request #1115 from ben/struct-versions
...
Version info for public structs
2012-12-05 11:47:19 -08:00