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
b1731215
Commit
b1731215
authored
Mar 31, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simple readability fixes.
parent
20ec426d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
7 deletions
+22
-7
tests-clar/object/tag/read.c
+3
-1
tests-clar/object/tag/write.c
+4
-1
tests-clar/object/tree/frompath.c
+5
-2
tests-clar/object/tree/write.c
+4
-1
tests-clar/refs/normalize.c
+3
-1
tests-clar/repo/discover.c
+3
-1
No files found.
tests-clar/object/tag/read.c
View file @
b1731215
...
@@ -12,7 +12,9 @@ static git_repository *g_repo;
...
@@ -12,7 +12,9 @@ static git_repository *g_repo;
// Helpers
// Helpers
static
void
ensure_tag_pattern_match
(
git_repository
*
repo
,
const
char
*
pattern
,
const
size_t
expected_matches
)
static
void
ensure_tag_pattern_match
(
git_repository
*
repo
,
const
char
*
pattern
,
const
size_t
expected_matches
)
{
{
git_strarray
tag_list
;
git_strarray
tag_list
;
int
error
=
GIT_SUCCESS
;
int
error
=
GIT_SUCCESS
;
...
...
tests-clar/object/tag/write.c
View file @
b1731215
...
@@ -14,7 +14,10 @@ static git_repository *g_repo;
...
@@ -14,7 +14,10 @@ static git_repository *g_repo;
#ifndef GIT_WIN32
#ifndef GIT_WIN32
#include "odb.h"
#include "odb.h"
static
void
locate_loose_object
(
const
char
*
repository_folder
,
git_object
*
object
,
char
**
out
,
char
**
out_folder
)
static
void
locate_loose_object
(
const
char
*
repository_folder
,
git_object
*
object
,
char
**
out
,
char
**
out_folder
)
{
{
static
const
char
*
objects_folder
=
"objects/"
;
static
const
char
*
objects_folder
=
"objects/"
;
...
...
tests-clar/object/tree/frompath.c
View file @
b1731215
...
@@ -24,7 +24,10 @@ void test_object_tree_frompath__cleanup(void)
...
@@ -24,7 +24,10 @@ void test_object_tree_frompath__cleanup(void)
cl_fixture_cleanup
(
"testrepo.git"
);
cl_fixture_cleanup
(
"testrepo.git"
);
}
}
static
void
assert_tree_from_path
(
git_tree
*
root
,
const
char
*
path
,
git_error
expected_result
,
const
char
*
expected_raw_oid
)
static
void
assert_tree_from_path
(
git_tree
*
root
,
const
char
*
path
,
git_error
expected_result
,
const
char
*
expected_raw_oid
)
{
{
git_tree
*
containing_tree
=
NULL
;
git_tree
*
containing_tree
=
NULL
;
...
@@ -35,7 +38,7 @@ static void assert_tree_from_path(git_tree *root, const char *path, git_error ex
...
@@ -35,7 +38,7 @@ static void assert_tree_from_path(git_tree *root, const char *path, git_error ex
cl_assert
(
containing_tree
!=
NULL
&&
expected_result
==
GIT_SUCCESS
);
cl_assert
(
containing_tree
!=
NULL
&&
expected_result
==
GIT_SUCCESS
);
cl_
assert
(
git_oid_streq
(
git_object_id
((
const
git_object
*
)
containing_tree
),
expected_raw_oid
)
==
GIT_SUCCESS
);
cl_
git_pass
(
git_oid_streq
(
git_object_id
((
const
git_object
*
)
containing_tree
),
expected_raw_oid
)
);
git_tree_free
(
containing_tree
);
git_tree_free
(
containing_tree
);
}
}
...
...
tests-clar/object/tree/write.c
View file @
b1731215
...
@@ -39,7 +39,10 @@ static int print_tree(git_repository *repo, const git_oid *tree_oid, int depth)
...
@@ -39,7 +39,10 @@ static int print_tree(git_repository *repo, const git_oid *tree_oid, int depth)
return
GIT_SUCCESS
;
return
GIT_SUCCESS
;
}
}
static
void
locate_loose_object
(
const
char
*
repository_folder
,
git_object
*
object
,
char
**
out
,
char
**
out_folder
)
static
void
locate_loose_object
(
const
char
*
repository_folder
,
git_object
*
object
,
char
**
out
,
char
**
out_folder
)
{
{
static
const
char
*
objects_folder
=
"objects/"
;
static
const
char
*
objects_folder
=
"objects/"
;
...
...
tests-clar/refs/normalize.c
View file @
b1731215
...
@@ -6,7 +6,9 @@
...
@@ -6,7 +6,9 @@
// Helpers
// Helpers
static
void
ensure_refname_normalized
(
int
is_oid_ref
,
const
char
*
input_refname
,
const
char
*
expected_refname
)
static
void
ensure_refname_normalized
(
int
is_oid_ref
,
const
char
*
input_refname
,
const
char
*
expected_refname
)
{
{
char
buffer_out
[
GIT_REFNAME_MAX
];
char
buffer_out
[
GIT_REFNAME_MAX
];
...
...
tests-clar/repo/discover.c
View file @
b1731215
...
@@ -23,7 +23,9 @@
...
@@ -23,7 +23,9 @@
#define ALTERNATE_MALFORMED_FOLDER3 DISCOVER_FOLDER "/alternate_malformed_repo3"
#define ALTERNATE_MALFORMED_FOLDER3 DISCOVER_FOLDER "/alternate_malformed_repo3"
#define ALTERNATE_NOT_FOUND_FOLDER DISCOVER_FOLDER "/alternate_not_found_repo"
#define ALTERNATE_NOT_FOUND_FOLDER DISCOVER_FOLDER "/alternate_not_found_repo"
static
void
ensure_repository_discover
(
const
char
*
start_path
,
const
char
*
ceiling_dirs
,
const
char
*
expected_path
)
static
void
ensure_repository_discover
(
const
char
*
start_path
,
const
char
*
ceiling_dirs
,
const
char
*
expected_path
)
{
{
char
found_path
[
GIT_PATH_MAX
];
char
found_path
[
GIT_PATH_MAX
];
cl_git_pass
(
git_repository_discover
(
found_path
,
sizeof
(
found_path
),
start_path
,
0
,
ceiling_dirs
));
cl_git_pass
(
git_repository_discover
(
found_path
,
sizeof
(
found_path
),
start_path
,
0
,
ceiling_dirs
));
...
...
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