summaryrefslogtreecommitdiff
path: root/tests-clar
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-09-20 22:57:01 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2013-10-02 06:42:26 +0200
commitc833893c64d28d4c017fdbf90bbeb714314a8dd9 (patch)
treea3a8535a34dbc33ffc014aae71cdbdb27074dd08 /tests-clar
parenteec1c1fe1e9a12b57c4014be25ce4ed390c8e199 (diff)
downloadlibgit2-c833893c64d28d4c017fdbf90bbeb714314a8dd9.tar.gz
clone: re-allow using a custom remote name
This is a small thing that by itself doesn't quite justify making the user use clone_into.
Diffstat (limited to 'tests-clar')
-rw-r--r--tests-clar/clone/nonetwork.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests-clar/clone/nonetwork.c b/tests-clar/clone/nonetwork.c
index 84654fa5a..c7a219259 100644
--- a/tests-clar/clone/nonetwork.c
+++ b/tests-clar/clone/nonetwork.c
@@ -122,6 +122,15 @@ void test_clone_nonetwork__fail_with_already_existing_but_non_empty_directory(vo
cl_git_fail(git_clone(&g_repo, cl_git_fixture_url("testrepo.git"), "./foo", &g_options));
}
+void test_clone_nonetwork__custom_origin_name(void)
+{
+ g_options.remote_name = "my_origin";
+ cl_git_pass(git_clone(&g_repo, cl_git_fixture_url("testrepo.git"), "./foo", &g_options));
+
+ cl_git_pass(git_remote_load(&g_remote, g_repo, "my_origin"));
+}
+
+
void test_clone_nonetwork__cope_with_already_existing_directory(void)
{
p_mkdir("./foo", GIT_DIR_MODE);