Commit Graph

39 Commits

Author SHA1 Message Date
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
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
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
Vicent Martí
e05ca13f1f Merge pull request #1115 from ben/struct-versions
Version info for public structs
2012-12-05 11:47:19 -08:00
nulltoken
032ba9e4ad remote: deploy EINVALIDSPEC usage 2012-12-01 08:34:23 +01:00
Ben Straub
1071176900 Deploy versioned git_transport structure 2012-11-30 13:12:15 -08:00
Ben Straub
df705148ec API updates for remote.h
Includes typedef for git_direction, and renames for
GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
2012-11-27 13:19:49 -08:00
Sascha Cunz
9094d30b93 Reset all static variables to NULL in clar's __cleanup
Without this change, any failed assertion in the second (or a later) test
inside a test suite has a chance of double deleting memory, resulting in
a heap corruption. See #1096 for details.

This leaves alone the test cases where we "just" use cl_git_sandbox_init()
and cl_git_sandbox_cleanup(). These methods already take good care to not
double delete a repository.

Fixes #1096
2012-11-23 11:41:56 +01:00
Justin Spahr-Summers
6edefa1491 Revert "Don't expect the 'empty-remote-url' remote to be listed"
Apparently git_remote_list() includes even remotes for which git_remote_load() would fail. Sorry @nulltoken, false alarm.

This reverts commit f358ec143c.
2012-11-05 10:58:13 -08:00
Justin Spahr-Summers
f358ec143c Don't expect the 'empty-remote-url' remote to be listed
CC @nulltoken
2012-11-05 10:45:26 -08:00
Justin Spahr-Summers
1fe99aeea3 Test for GITERR_INVALID 2012-11-05 10:44:48 -08:00
nulltoken
a2a618948c remote: Add malformed remote load test 2012-11-04 23:08:17 -08:00
Philip Kelley
41fb1ca0ec Reorganize transport architecture (squashed 3) 2012-11-01 09:02:33 -04:00
nulltoken
e497b16c57 remote: prevent from saving a nameless remote 2012-10-25 17:42:33 +02:00
Carlos Martín Nieto
218c88a968 remote: set/unset the autotag setting on save
Make the configuration option match the configured behavior when
saving a remote.
2012-10-02 13:09:18 +02:00
nulltoken
e16fc07f7e refspec: No remote tracking ref from a fetchspec-less remote 2012-09-13 22:31:29 +02:00
Sascha Cunz
eff5b49927 Remotes: Use correct url in git_remote_connect 2012-07-27 00:08:56 +02:00
Sascha Cunz
413d556384 Remotes: Save a cleaned pushurl (by deleting it from the config) 2012-07-27 00:08:54 +02:00
Sascha Cunz
8689a69d09 Tests: Test remote's pushurl 2012-07-26 23:08:24 +02:00
Vicent Marti
a146ba9e5b tests: Fix warning with nested comments 2012-06-05 22:16:08 +02:00
nulltoken
d27bf66561 remote: Make git_remote_add() generate a default refspec with a force update specifier 2012-06-04 23:47:09 +02:00
nulltoken
d05e2c64dd refspec: expose the force update specifier through git_refspec_force() accessor 2012-05-30 01:05:17 +02:00
Carlos Martín Nieto
baaa8a447e remotes: change git_remote_new's signature
Add a fetch refspec arguemnt and make the arguments (name, url,
refspec), as that order makes more sense.
2012-05-08 21:36:40 +02:00
Carlos Martín Nieto
a209a025c6 remote: add git_remote_add()
Helper function to create a remote with the default settings
2012-05-08 21:36:40 +02:00
nulltoken
9fb70f378a remote: make git_remote_load() return GIT_ENOTFOUND when the remote url cannot be retrieved from the config file 2012-05-08 10:05:12 +02:00
Vicent Martí
3fbcac89c4 Remove old and unused error codes 2012-05-02 19:56:38 -07:00
Vicent Martí
946a6dc4e6 Update test suite 2012-05-02 16:14:30 -07:00
Ben Straub
20ec426dde Discovered cl_git_strequal! Mounted a crusade! 2012-03-31 19:47:59 -07:00
Ryan Wilcox
7a54496629 introduced new function: git_remote_supported_url() <-- returns true if this version of libgit2 supports the correct transport mechanism for a URL or path 2012-03-01 08:31:50 -05:00
Ryan Wilcox
58448910a0 implement support for username@host:path URLs in transport_find_fn() 2012-02-29 17:37:18 -05:00
Carlos Martín Nieto
8171998f8d Add git_remote_list()
Loops through the configuration and generates a list of configured
remotes.
2012-02-26 19:15:36 +01:00
Carlos Martín Nieto
9554cd514c A remote exists with an URL alone
We used to consider it an error if a remote didn't have at least a
fetch refspec. This was too much checking, as a remote doesn't in fact
need to have anything other than an URL configured to be considered
a remote.
2012-02-24 12:14:26 +01:00
Carlos Martín Nieto
89e5ed98dc Add git_remote_save() 2012-02-20 19:48:41 +01:00
Carlos Martín Nieto
bcb8c007f1 Add git_remote_set_{fetch,push}spec()
Allow setting the fetch and push refspecs, which is useful for
creating new refspecs.
2012-02-20 18:42:05 +01:00
Carlos Martín Nieto
771cde4318 tests: free the remotes temp buffer 2012-02-01 04:41:42 +01:00
Carlos Martín Nieto
279afd2a51 refspec: a ref name includes the refs/ prefix
git_refspec_transform_r assumed that the reference name passed would
be only a branch or tag name. This is not the case, and we need to
take into consideration what's in the refspec's source to know how
much of the prefix to ignore.
2012-01-31 17:29:53 +01:00
Vicent Martí
3fd1520cd4 Rename the Clay test suite to Clar
Clay is the name of a programming language on the makings, and we want
to avoid confusions. Sorry for the huge diff!
2012-01-24 20:35:15 -08:00