Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
303b4c68
Commit
303b4c68
authored
Nov 07, 2020
by
Reginald McLean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
worktree: change test to invalidate worktree via filesystem
parent
6405ce29
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
tests/worktree/worktree.c
+1
-4
tests/worktree/worktree_helpers.c
+1
-0
No files found.
tests/worktree/worktree.c
View file @
303b4c68
...
@@ -616,11 +616,8 @@ void test_worktree_worktree__validate_invalid_worktreedir(void)
...
@@ -616,11 +616,8 @@ void test_worktree_worktree__validate_invalid_worktreedir(void)
git_worktree
*
wt
;
git_worktree
*
wt
;
cl_git_pass
(
git_worktree_lookup
(
&
wt
,
fixture
.
repo
,
"testrepo-worktree"
));
cl_git_pass
(
git_worktree_lookup
(
&
wt
,
fixture
.
repo
,
"testrepo-worktree"
));
git__free
(
wt
->
worktree_path
);
p_rename
(
"testrepo-worktree"
,
"testrepo-worktree-tmp"
);
wt
->
worktree_path
=
"/path/to/invalid/worktreedir"
;
cl_git_fail
(
git_worktree_validate
(
wt
));
cl_git_fail
(
git_worktree_validate
(
wt
));
wt
->
worktree_path
=
NULL
;
git_worktree_free
(
wt
);
git_worktree_free
(
wt
);
}
}
tests/worktree/worktree_helpers.c
View file @
303b4c68
...
@@ -19,6 +19,7 @@ void cleanup_fixture_worktree(worktree_fixture *fixture)
...
@@ -19,6 +19,7 @@ void cleanup_fixture_worktree(worktree_fixture *fixture)
cl_fixture_cleanup
(
fixture
->
reponame
);
cl_fixture_cleanup
(
fixture
->
reponame
);
if
(
fixture
->
worktreename
)
if
(
fixture
->
worktreename
)
cl_fixture_cleanup
(
fixture
->
worktreename
);
cl_fixture_cleanup
(
fixture
->
worktreename
);
p_rename
(
"testrepo-worktree-tmp"
,
"testrepo-worktree"
);
}
}
void
setup_fixture_worktree
(
worktree_fixture
*
fixture
)
void
setup_fixture_worktree
(
worktree_fixture
*
fixture
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment