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
3520c970
Commit
3520c970
authored
Mar 27, 2015
by
Edward Thomson
Committed by
Edward Thomson
May 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Always checkout with case sensitive iterator"
This reverts commit
40d79154
.
parent
6dfd8506
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
src/checkout.c
+1
-1
tests/checkout/tree.c
+13
-2
No files found.
src/checkout.c
View file @
3520c970
...
...
@@ -2643,7 +2643,7 @@ int git_checkout_tree(
if
((
error
=
git_repository_index
(
&
index
,
repo
))
<
0
)
return
error
;
if
(
!
(
error
=
git_iterator_for_tree
(
&
tree_i
,
tree
,
GIT_ITERATOR_DONT_IGNORE_CASE
,
NULL
,
NULL
)))
if
(
!
(
error
=
git_iterator_for_tree
(
&
tree_i
,
tree
,
0
,
NULL
,
NULL
)))
error
=
git_checkout_iterator
(
tree_i
,
index
,
opts
);
git_iterator_free
(
tree_i
);
...
...
tests/checkout/tree.c
View file @
3520c970
...
...
@@ -646,7 +646,14 @@ void test_checkout_tree__can_cancel_checkout_from_notify(void)
cl_git_fail_with
(
git_checkout_tree
(
g_repo
,
obj
,
&
opts
),
-
5555
);
cl_assert
(
!
git_path_exists
(
"testrepo/new.txt"
));
cl_assert_equal_i
(
4
,
ca
.
count
);
/* on case-insensitive FS = a/b.txt, branch_file.txt, new.txt */
/* on case-sensitive FS = README, then above */
if
(
git_path_exists
(
"testrepo/.git/CoNfIg"
))
/* case insensitive */
cl_assert_equal_i
(
3
,
ca
.
count
);
else
cl_assert_equal_i
(
4
,
ca
.
count
);
/* and again with a different stopping point and return code */
ca
.
filename
=
"README"
;
...
...
@@ -656,7 +663,11 @@ void test_checkout_tree__can_cancel_checkout_from_notify(void)
cl_git_fail_with
(
git_checkout_tree
(
g_repo
,
obj
,
&
opts
),
123
);
cl_assert
(
!
git_path_exists
(
"testrepo/new.txt"
));
cl_assert_equal_i
(
1
,
ca
.
count
);
if
(
git_path_exists
(
"testrepo/.git/CoNfIg"
))
/* case insensitive */
cl_assert_equal_i
(
4
,
ca
.
count
);
else
cl_assert_equal_i
(
1
,
ca
.
count
);
git_object_free
(
obj
);
}
...
...
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