Commit 3e500fc8d225b855558ceadf5875502fe27e2015

Carson Howard 2017-10-16T19:55:45

test: submodule: add: join path without slashes

diff --git a/tests/submodule/add.c b/tests/submodule/add.c
index dec36a5..76cdda8 100644
--- a/tests/submodule/add.c
+++ b/tests/submodule/add.c
@@ -140,8 +140,8 @@ void test_submodule_add__path_exists_in_index(void)
 	/* In this repo, HEAD (master) has no remote tracking branc h*/
 	g_repo = cl_git_sandbox_init("testrepo");
 
-	git_buf_joinpath(&dirname, git_repository_workdir(g_repo), "/TestGitRepository");
-	git_buf_joinpath(&filename, dirname.ptr, "/test.txt");
+	git_buf_joinpath(&dirname, git_repository_workdir(g_repo), "TestGitRepository");
+	git_buf_joinpath(&filename, dirname.ptr, "test.txt");
 
 	p_mkdir(dirname.ptr, 0700);
 	fd = fopen(filename.ptr, "w");
@@ -174,7 +174,7 @@ void test_submodule_add__file_exists_in_index(void)
 	/* In this repo, HEAD (master) has no remote tracking branc h*/
 	g_repo = cl_git_sandbox_init("testrepo");
 
-	git_buf_joinpath(&name, git_repository_workdir(g_repo), "/TestGitRepository");
+	git_buf_joinpath(&name, git_repository_workdir(g_repo), "TestGitRepository");
 
 	fd = fopen(name.ptr, "w");
 	fclose(fd);