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
e5975f36
Commit
e5975f36
authored
Jul 30, 2021
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: reset odb backend priority
parent
e87bcb3d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
src/odb.c
+2
-2
src/odb.h
+3
-0
tests/odb/sorting.c
+6
-0
No files found.
src/odb.c
View file @
e5975f36
...
@@ -29,8 +29,8 @@
...
@@ -29,8 +29,8 @@
* We work under the assumption that most objects for long-running
* We work under the assumption that most objects for long-running
* operations will be packed
* operations will be packed
*/
*/
int
git_odb__loose_priority
=
1
;
int
git_odb__loose_priority
=
GIT_ODB_DEFAULT_LOOSE_PRIORITY
;
int
git_odb__packed_priority
=
2
;
int
git_odb__packed_priority
=
GIT_ODB_DEFAULT_PACKED_PRIORITY
;
bool
git_odb__strict_hash_verification
=
true
;
bool
git_odb__strict_hash_verification
=
true
;
...
...
src/odb.h
View file @
e5975f36
...
@@ -24,6 +24,9 @@
...
@@ -24,6 +24,9 @@
#define GIT_OBJECT_DIR_MODE 0777
#define GIT_OBJECT_DIR_MODE 0777
#define GIT_OBJECT_FILE_MODE 0444
#define GIT_OBJECT_FILE_MODE 0444
#define GIT_ODB_DEFAULT_LOOSE_PRIORITY 1
#define GIT_ODB_DEFAULT_PACKED_PRIORITY 2
extern
bool
git_odb__strict_hash_verification
;
extern
bool
git_odb__strict_hash_verification
;
/* DO NOT EXPORT */
/* DO NOT EXPORT */
...
...
tests/odb/sorting.c
View file @
e5975f36
#include "clar_libgit2.h"
#include "clar_libgit2.h"
#include "git2/sys/odb_backend.h"
#include "git2/sys/odb_backend.h"
#include "odb.h"
typedef
struct
{
typedef
struct
{
git_odb_backend
base
;
git_odb_backend
base
;
...
@@ -43,6 +44,11 @@ void test_odb_sorting__cleanup(void)
...
@@ -43,6 +44,11 @@ void test_odb_sorting__cleanup(void)
{
{
git_odb_free
(
_odb
);
git_odb_free
(
_odb
);
_odb
=
NULL
;
_odb
=
NULL
;
cl_git_pass
(
git_libgit2_opts
(
GIT_OPT_SET_ODB_LOOSE_PRIORITY
,
GIT_ODB_DEFAULT_LOOSE_PRIORITY
));
cl_git_pass
(
git_libgit2_opts
(
GIT_OPT_SET_ODB_PACKED_PRIORITY
,
GIT_ODB_DEFAULT_PACKED_PRIORITY
));
}
}
void
test_odb_sorting__basic_backends_sorting
(
void
)
void
test_odb_sorting__basic_backends_sorting
(
void
)
...
...
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