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
eca9e1cf
Unverified
Commit
eca9e1cf
authored
Feb 22, 2022
by
Edward Thomson
Committed by
GitHub
Feb 22, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6228 from libgit2/ethomson/win32_systemdirs
win32: `find_system_dirs` does not return `GIT_ENOTFOUND`
parents
1551b1f0
f45121ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
src/win32/findfile.c
+1
-1
tests/win32/systemdir.c
+10
-0
No files found.
src/win32/findfile.c
View file @
eca9e1cf
...
...
@@ -222,7 +222,7 @@ int git_win32__find_system_dirs(git_str *out, const char *subdir)
has_regdir
=
(
find_sysdir_in_registry
(
regdir
)
==
0
);
if
(
!
has_pathdir
&&
!
has_regdir
)
return
GIT_ENOTFOUND
;
return
0
;
/*
* Usually the git in the path is the same git in the registry,
...
...
tests/win32/systemdir.c
View file @
eca9e1cf
...
...
@@ -326,3 +326,13 @@ void test_win32_systemdir__prefers_path_to_registry(void)
git_config_free
(
cfg
);
#endif
}
void
test_win32_systemdir__no_git_installed
(
void
)
{
#ifdef GIT_WIN32
git_str
out
=
GIT_STR_INIT
;
cl_git_pass
(
git_win32__find_system_dirs
(
&
out
,
"etc"
));
cl_assert_equal_s
(
out
.
ptr
,
""
);
#endif
}
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