summaryrefslogtreecommitdiff
path: root/tests-clar
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-02-24 12:14:26 +0100
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-02-24 12:14:26 +0100
commit9554cd514c2a0acd6c9df255b457356873ab16b2 (patch)
tree8dedbf5ca6084a86b0114bdce8f80fbbce17d0e9 /tests-clar
parent1db9d2c3bba2fe95280dca34bc04d261bd5d31f7 (diff)
downloadlibgit2-9554cd514c2a0acd6c9df255b457356873ab16b2.tar.gz
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.
Diffstat (limited to 'tests-clar')
-rw-r--r--tests-clar/network/remotes.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests-clar/network/remotes.c b/tests-clar/network/remotes.c
index beb0bcc8c..cc453e36a 100644
--- a/tests-clar/network/remotes.c
+++ b/tests-clar/network/remotes.c
@@ -101,3 +101,16 @@ void test_network_remotes__transform_r(void)
cl_assert(!strcmp(git_buf_cstr(&buf), "refs/remotes/test/master"));
git_buf_free(&buf);
}
+
+void test_network_remotes__missing_refspecs(void)
+{
+ git_config *cfg;
+
+ git_remote_free(_remote);
+
+ cl_git_pass(git_repository_config(&cfg, _repo));
+ cl_git_pass(git_config_set_string(cfg, "remote.specless.url", "http://example.com"));
+ cl_git_pass(git_remote_load(&_remote, _repo, "specless"));
+
+ git_config_free(cfg);
+}