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
01a22586
Commit
01a22586
authored
Nov 06, 2020
by
Reginald McLean
Committed by
Edward Thomson
Jun 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
worktree: Demonstrate missing worktree check
worktree_dir isn't validated when it should be
parent
ae71dd88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
tests/worktree/worktree.c
+14
-0
No files found.
tests/worktree/worktree.c
View file @
01a22586
...
@@ -610,3 +610,17 @@ void test_worktree_worktree__foreach_worktree_lists_all_worktrees(void)
...
@@ -610,3 +610,17 @@ void test_worktree_worktree__foreach_worktree_lists_all_worktrees(void)
int
counter
=
0
;
int
counter
=
0
;
cl_git_pass
(
git_repository_foreach_worktree
(
fixture
.
repo
,
foreach_worktree_cb
,
&
counter
));
cl_git_pass
(
git_repository_foreach_worktree
(
fixture
.
repo
,
foreach_worktree_cb
,
&
counter
));
}
}
void
test_worktree_worktree__validate_invalid_worktreedir
(
void
)
{
git_worktree
*
wt
;
cl_git_pass
(
git_worktree_lookup
(
&
wt
,
fixture
.
repo
,
"testrepo-worktree"
));
git__free
(
wt
->
worktree_path
);
wt
->
worktree_path
=
"/path/to/invalid/worktreedir"
;
cl_git_fail
(
git_worktree_validate
(
wt
));
wt
->
worktree_path
=
NULL
;
git_worktree_free
(
wt
);
}
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