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
4e85b4fc
Unverified
Commit
4e85b4fc
authored
Apr 05, 2022
by
Edward Thomson
Committed by
GitHub
Apr 05, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6259 from libgit2/ethomson/diff_arm32
diff: don't stat empty file on arm32 (flaky test)
parents
cd8fde82
42093d6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
tests/libgit2/diff/workdir.c
+8
-4
No files found.
tests/libgit2/diff/workdir.c
View file @
4e85b4fc
...
...
@@ -1237,7 +1237,6 @@ void test_diff_workdir__can_diff_empty_file(void)
git_diff
*
diff
;
git_tree
*
tree
;
git_diff_options
opts
=
GIT_DIFF_OPTIONS_INIT
;
struct
stat
st
;
git_patch
*
patch
;
g_repo
=
cl_git_sandbox_init
(
"attr_index"
);
...
...
@@ -1251,10 +1250,15 @@ void test_diff_workdir__can_diff_empty_file(void)
git_diff_free
(
diff
);
/* empty contents of file */
cl_git_rewritefile
(
"attr_index/README.txt"
,
""
);
cl_git_pass
(
git_fs_path_lstat
(
"attr_index/README.txt"
,
&
st
));
cl_assert_equal_i
(
0
,
(
int
)
st
.
st_size
);
#if !defined(__arm__) || !defined(GIT_ARCH_32)
{
struct
stat
st
;
cl_git_pass
(
git_fs_path_lstat
(
"attr_index/README.txt"
,
&
st
));
cl_assert
(
st
.
st_size
==
0
);
}
#endif
cl_git_pass
(
git_diff_tree_to_workdir
(
&
diff
,
g_repo
,
tree
,
&
opts
));
cl_assert_equal_i
(
3
,
(
int
)
git_diff_num_deltas
(
diff
));
...
...
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