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
4adb4815
Commit
4adb4815
authored
Jan 25, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1278 from sba1/cl-assert-equal-s
Use cl_assert_equal_s() instead of strcmp().
parents
28db9f21
a7f8065f
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
48 additions
and
48 deletions
+48
-48
tests-clar/commit/parse.c
+6
-6
tests-clar/commit/write.c
+6
-6
tests-clar/config/read.c
+1
-1
tests-clar/config/stress.c
+4
-4
tests-clar/config/write.c
+1
-1
tests-clar/fetchhead/nonetwork.c
+5
-5
tests-clar/index/conflicts.c
+2
-2
tests-clar/index/reuc.c
+11
-11
tests-clar/network/remotes.c
+4
-4
tests-clar/notes/notesref.c
+4
-4
tests-clar/refs/branches/delete.c
+1
-1
tests-clar/refs/normalize.c
+1
-1
tests-clar/refs/unicode.c
+2
-2
No files found.
tests-clar/commit/parse.c
View file @
4adb4815
...
...
@@ -159,8 +159,8 @@ void test_commit_parse__signature(void)
size_t
len
=
strlen
(
passcase
->
string
);
struct
git_signature
person
=
{
0
};
cl_git_pass
(
git_signature__parse
(
&
person
,
&
str
,
str
+
len
,
passcase
->
header
,
'\n'
));
cl_assert
(
strcmp
(
passcase
->
name
,
person
.
name
)
==
0
);
cl_assert
(
strcmp
(
passcase
->
email
,
person
.
email
)
==
0
);
cl_assert
_equal_s
(
passcase
->
name
,
person
.
name
);
cl_assert
_equal_s
(
passcase
->
email
,
person
.
email
);
cl_assert
(
passcase
->
time
==
person
.
when
.
time
);
cl_assert
(
passcase
->
offset
==
person
.
when
.
offset
);
git__free
(
person
.
name
);
git__free
(
person
.
email
);
...
...
@@ -347,10 +347,10 @@ void test_commit_parse__details0(void) {
commit_time
=
git_commit_time
(
commit
);
parents
=
git_commit_parentcount
(
commit
);
cl_assert
(
strcmp
(
author
->
name
,
"Scott Chacon"
)
==
0
);
cl_assert
(
strcmp
(
author
->
email
,
"schacon@gmail.com"
)
==
0
);
cl_assert
(
strcmp
(
committer
->
name
,
"Scott Chacon"
)
==
0
);
cl_assert
(
strcmp
(
committer
->
email
,
"schacon@gmail.com"
)
==
0
);
cl_assert
_equal_s
(
"Scott Chacon"
,
author
->
name
);
cl_assert
_equal_s
(
"schacon@gmail.com"
,
author
->
email
);
cl_assert
_equal_s
(
"Scott Chacon"
,
committer
->
name
);
cl_assert
_equal_s
(
"schacon@gmail.com"
,
committer
->
email
);
cl_assert
(
message
!=
NULL
);
cl_assert
(
strchr
(
message
,
'\n'
)
!=
NULL
);
cl_assert
(
commit_time
>
0
);
...
...
tests-clar/commit/write.c
View file @
4adb4815
...
...
@@ -78,19 +78,19 @@ void test_commit_write__from_memory(void)
/* Check attributes were set correctly */
author1
=
git_commit_author
(
commit
);
cl_assert
(
author1
!=
NULL
);
cl_assert
(
strcmp
(
author1
->
name
,
committer_name
)
==
0
);
cl_assert
(
strcmp
(
author1
->
email
,
committer_email
)
==
0
);
cl_assert
_equal_s
(
committer_name
,
author1
->
name
);
cl_assert
_equal_s
(
committer_email
,
author1
->
email
);
cl_assert
(
author1
->
when
.
time
==
987654321
);
cl_assert
(
author1
->
when
.
offset
==
90
);
committer1
=
git_commit_committer
(
commit
);
cl_assert
(
committer1
!=
NULL
);
cl_assert
(
strcmp
(
committer1
->
name
,
committer_name
)
==
0
);
cl_assert
(
strcmp
(
committer1
->
email
,
committer_email
)
==
0
);
cl_assert
_equal_s
(
committer_name
,
committer1
->
name
);
cl_assert
_equal_s
(
committer_email
,
committer1
->
email
);
cl_assert
(
committer1
->
when
.
time
==
123456789
);
cl_assert
(
committer1
->
when
.
offset
==
60
);
cl_assert
(
strcmp
(
git_commit_message
(
commit
),
commit_message
)
==
0
);
cl_assert
_equal_s
(
commit_message
,
git_commit_message
(
commit
)
);
}
// create a root commit
...
...
@@ -142,5 +142,5 @@ void test_commit_write__root(void)
cl_git_pass
(
git_reference_lookup
(
&
branch
,
g_repo
,
branch_name
));
branch_oid
=
git_reference_target
(
branch
);
cl_git_pass
(
git_oid_cmp
(
branch_oid
,
&
commit_id
));
cl_assert
(
!
strcmp
(
git_commit_message
(
commit
),
root_commit_message
));
cl_assert
_equal_s
(
root_commit_message
,
git_commit_message
(
commit
));
}
tests-clar/config/read.c
View file @
4adb4815
...
...
@@ -194,7 +194,7 @@ void test_config_read__escaping_quotes(void)
cl_git_pass
(
git_config_open_ondisk
(
&
cfg
,
cl_fixture
(
"config/config13"
)));
cl_git_pass
(
git_config_get_string
(
&
str
,
cfg
,
"core.editor"
));
cl_assert
(
strcmp
(
str
,
"
\"
C:/Program Files/Nonsense/bah.exe
\"
\"
--some option
\"
"
)
==
0
);
cl_assert
_equal_s
(
"
\"
C:/Program Files/Nonsense/bah.exe
\"
\"
--some option
\"
"
,
str
);
git_config_free
(
cfg
);
}
...
...
tests-clar/config/stress.c
View file @
4adb4815
...
...
@@ -45,13 +45,13 @@ void test_config_stress__comments(void)
cl_git_pass
(
git_config_open_ondisk
(
&
config
,
cl_fixture
(
"config/config12"
)));
cl_git_pass
(
git_config_get_string
(
&
str
,
config
,
"some.section.other"
));
cl_assert
(
!
strcmp
(
str
,
"hello!
\"
; ; ; "
)
);
cl_assert
_equal_s
(
"hello!
\"
; ; ; "
,
str
);
cl_git_pass
(
git_config_get_string
(
&
str
,
config
,
"some.section.multi"
));
cl_assert
(
!
strcmp
(
str
,
"hi, this is a ; multiline comment # with ;
\n
special chars and other stuff !@#"
)
);
cl_assert
_equal_s
(
"hi, this is a ; multiline comment # with ;
\n
special chars and other stuff !@#"
,
str
);
cl_git_pass
(
git_config_get_string
(
&
str
,
config
,
"some.section.back"
));
cl_assert
(
!
strcmp
(
str
,
"this is
\b
a phrase"
)
);
cl_assert
_equal_s
(
"this is
\b
a phrase"
,
str
);
git_config_free
(
config
);
}
...
...
@@ -70,7 +70,7 @@ void test_config_stress__escape_subsection_names(void)
cl_git_pass
(
git_config_open_ondisk
(
&
config
,
TEST_CONFIG
));
cl_git_pass
(
git_config_get_string
(
&
str
,
config
,
"some.sec
\\
tion.other"
));
cl_assert
(
!
strcmp
(
"foo"
,
str
)
);
cl_assert
_equal_s
(
"foo"
,
str
);
git_config_free
(
config
);
}
...
...
tests-clar/config/write.c
View file @
4adb4815
...
...
@@ -116,7 +116,7 @@ void test_config_write__write_subsection(void)
cl_git_pass
(
git_config_open_ondisk
(
&
cfg
,
"config9"
));
cl_git_pass
(
git_config_get_string
(
&
str
,
cfg
,
"my.own.var"
));
cl_
git_pass
(
strcmp
(
str
,
"works"
)
);
cl_
assert_equal_s
(
"works"
,
str
);
git_config_free
(
cfg
);
}
...
...
tests-clar/fetchhead/nonetwork.c
View file @
4adb4815
...
...
@@ -124,12 +124,12 @@ static int fetchhead_ref_cb(const char *name, const char *url,
cl_assert
(
expected
->
is_merge
==
is_merge
);
if
(
expected
->
ref_name
)
cl_assert
(
strcmp
(
expected
->
ref_name
,
name
)
==
0
);
cl_assert
_equal_s
(
expected
->
ref_name
,
name
);
else
cl_assert
(
name
==
NULL
);
if
(
expected
->
remote_url
)
cl_assert
(
strcmp
(
expected
->
remote_url
,
url
)
==
0
);
cl_assert
_equal_s
(
expected
->
remote_url
,
url
);
else
cl_assert
(
url
==
NULL
);
...
...
@@ -199,8 +199,8 @@ static int read_type_missing(const char *ref_name, const char *remote_url,
git_oid_fromstr
(
&
expected
,
"49322bb17d3acc9146f98c97d078513228bbf3c0"
);
cl_assert
(
strcmp
(
ref_name
,
"name"
)
==
0
);
cl_assert
(
strcmp
(
remote_url
,
"remote_url"
)
==
0
);
cl_assert
_equal_s
(
"name"
,
ref_name
);
cl_assert
_equal_s
(
"remote_url"
,
remote_url
);
cl_assert
(
git_oid_cmp
(
&
expected
,
oid
)
==
0
);
cl_assert
(
is_merge
==
0
);
...
...
@@ -227,7 +227,7 @@ static int read_name_missing(const char *ref_name, const char *remote_url,
git_oid_fromstr
(
&
expected
,
"49322bb17d3acc9146f98c97d078513228bbf3c0"
);
cl_assert
(
ref_name
==
NULL
);
cl_assert
(
strcmp
(
remote_url
,
"remote_url"
)
==
0
);
cl_assert
_equal_s
(
"remote_url"
,
remote_url
);
cl_assert
(
git_oid_cmp
(
&
expected
,
oid
)
==
0
);
cl_assert
(
is_merge
==
0
);
...
...
tests-clar/index/conflicts.c
View file @
4adb4815
...
...
@@ -104,7 +104,7 @@ void test_index_conflicts__get(void)
cl_git_pass
(
git_index_conflict_get
(
&
conflict_entry
[
0
],
&
conflict_entry
[
1
],
&
conflict_entry
[
2
],
repo_index
,
"conflicts-one.txt"
));
cl_assert
(
strcmp
(
conflict_entry
[
0
]
->
path
,
"conflicts-one.txt"
)
==
0
);
cl_assert
_equal_s
(
"conflicts-one.txt"
,
conflict_entry
[
0
]
->
path
);
git_oid_fromstr
(
&
oid
,
CONFLICTS_ONE_ANCESTOR_OID
);
cl_assert
(
git_oid_cmp
(
&
conflict_entry
[
0
]
->
oid
,
&
oid
)
==
0
);
...
...
@@ -118,7 +118,7 @@ void test_index_conflicts__get(void)
cl_git_pass
(
git_index_conflict_get
(
&
conflict_entry
[
0
],
&
conflict_entry
[
1
],
&
conflict_entry
[
2
],
repo_index
,
"conflicts-two.txt"
));
cl_assert
(
strcmp
(
conflict_entry
[
0
]
->
path
,
"conflicts-two.txt"
)
==
0
);
cl_assert
_equal_s
(
"conflicts-two.txt"
,
conflict_entry
[
0
]
->
path
);
git_oid_fromstr
(
&
oid
,
CONFLICTS_TWO_ANCESTOR_OID
);
cl_assert
(
git_oid_cmp
(
&
conflict_entry
[
0
]
->
oid
,
&
oid
)
==
0
);
...
...
tests-clar/index/reuc.c
View file @
4adb4815
...
...
@@ -47,7 +47,7 @@ void test_index_reuc__add(void)
cl_assert
(
reuc
=
git_index_reuc_get_bypath
(
repo_index
,
"newfile.txt"
));
cl_assert
(
strcmp
(
reuc
->
path
,
"newfile.txt"
)
==
0
);
cl_assert
_equal_s
(
"newfile.txt"
,
reuc
->
path
);
cl_assert
(
reuc
->
mode
[
0
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
1
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
2
]
==
0100644
);
...
...
@@ -72,7 +72,7 @@ void test_index_reuc__add_no_ancestor(void)
cl_assert
(
reuc
=
git_index_reuc_get_bypath
(
repo_index
,
"newfile.txt"
));
cl_assert
(
strcmp
(
reuc
->
path
,
"newfile.txt"
)
==
0
);
cl_assert
_equal_s
(
"newfile.txt"
,
reuc
->
path
);
cl_assert
(
reuc
->
mode
[
0
]
==
0
);
cl_assert
(
reuc
->
mode
[
1
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
2
]
==
0100644
);
...
...
@@ -90,7 +90,7 @@ void test_index_reuc__read_bypath(void)
cl_assert
(
reuc
=
git_index_reuc_get_bypath
(
repo_index
,
"two.txt"
));
cl_assert
(
strcmp
(
reuc
->
path
,
"two.txt"
)
==
0
);
cl_assert
_equal_s
(
"two.txt"
,
reuc
->
path
);
cl_assert
(
reuc
->
mode
[
0
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
1
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
2
]
==
0100644
);
...
...
@@ -103,7 +103,7 @@ void test_index_reuc__read_bypath(void)
cl_assert
(
reuc
=
git_index_reuc_get_bypath
(
repo_index
,
"one.txt"
));
cl_assert
(
strcmp
(
reuc
->
path
,
"one.txt"
)
==
0
);
cl_assert
_equal_s
(
"one.txt"
,
reuc
->
path
);
cl_assert
(
reuc
->
mode
[
0
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
1
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
2
]
==
0100644
);
...
...
@@ -135,7 +135,7 @@ void test_index_reuc__ignore_case(void)
cl_assert
(
reuc
=
git_index_reuc_get_bypath
(
repo_index
,
"TWO.txt"
));
cl_assert
(
strcmp
(
reuc
->
path
,
"two.txt"
)
==
0
);
cl_assert
_equal_s
(
"two.txt"
,
reuc
->
path
);
cl_assert
(
reuc
->
mode
[
0
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
1
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
2
]
==
0100644
);
...
...
@@ -156,7 +156,7 @@ void test_index_reuc__read_byindex(void)
cl_assert
(
reuc
=
git_index_reuc_get_byindex
(
repo_index
,
0
));
cl_assert
(
strcmp
(
reuc
->
path
,
"one.txt"
)
==
0
);
cl_assert
_equal_s
(
"one.txt"
,
reuc
->
path
);
cl_assert
(
reuc
->
mode
[
0
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
1
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
2
]
==
0100644
);
...
...
@@ -169,7 +169,7 @@ void test_index_reuc__read_byindex(void)
cl_assert
(
reuc
=
git_index_reuc_get_byindex
(
repo_index
,
1
));
cl_assert
(
strcmp
(
reuc
->
path
,
"two.txt"
)
==
0
);
cl_assert
_equal_s
(
"two.txt"
,
reuc
->
path
);
cl_assert
(
reuc
->
mode
[
0
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
1
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
2
]
==
0100644
);
...
...
@@ -212,7 +212,7 @@ void test_index_reuc__updates_existing(void)
cl_assert
(
reuc
=
git_index_reuc_get_byindex
(
repo_index
,
0
));
cl_assert
(
strcmp
(
reuc
->
path
,
"TWO.txt"
)
==
0
);
cl_assert
_equal_s
(
"TWO.txt"
,
reuc
->
path
);
git_oid_fromstr
(
&
oid
,
TWO_OUR_OID
);
cl_assert
(
git_oid_cmp
(
&
reuc
->
oid
[
0
],
&
oid
)
==
0
);
git_oid_fromstr
(
&
oid
,
TWO_THEIR_OID
);
...
...
@@ -235,7 +235,7 @@ void test_index_reuc__remove(void)
cl_assert
(
reuc
=
git_index_reuc_get_byindex
(
repo_index
,
0
));
cl_assert
(
strcmp
(
reuc
->
path
,
"two.txt"
)
==
0
);
cl_assert
_equal_s
(
"two.txt"
,
reuc
->
path
);
cl_assert
(
reuc
->
mode
[
0
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
1
]
==
0100644
);
cl_assert
(
reuc
->
mode
[
2
]
==
0100644
);
...
...
@@ -280,9 +280,9 @@ void test_index_reuc__write(void)
/* ensure sort order was round-tripped correct */
cl_assert
(
reuc
=
git_index_reuc_get_byindex
(
repo_index
,
0
));
cl_assert
(
strcmp
(
reuc
->
path
,
"one.txt"
)
==
0
);
cl_assert
_equal_s
(
"one.txt"
,
reuc
->
path
);
cl_assert
(
reuc
=
git_index_reuc_get_byindex
(
repo_index
,
1
));
cl_assert
(
strcmp
(
reuc
->
path
,
"two.txt"
)
==
0
);
cl_assert
_equal_s
(
"two.txt"
,
reuc
->
path
);
}
tests-clar/network/remotes.c
View file @
4adb4815
...
...
@@ -258,9 +258,9 @@ void test_network_remotes__add(void)
cl_git_pass
(
git_remote_load
(
&
_remote
,
_repo
,
"addtest"
));
_refspec
=
git_remote_fetchspec
(
_remote
);
cl_assert
(
!
strcmp
(
git_refspec_src
(
_refspec
),
"refs/heads/*"
));
cl_assert
_equal_s
(
"refs/heads/*"
,
git_refspec_src
(
_refspec
));
cl_assert
(
git_refspec_force
(
_refspec
)
==
1
);
cl_assert
(
!
strcmp
(
git_refspec_dst
(
_refspec
),
"refs/remotes/addtest/*"
));
cl_assert
_equal_s
(
"refs/remotes/addtest/*"
,
git_refspec_dst
(
_refspec
));
cl_assert_equal_s
(
git_remote_url
(
_remote
),
"http://github.com/libgit2/libgit2"
);
}
...
...
@@ -310,12 +310,12 @@ void test_network_remotes__tagopt(void)
git_remote_set_autotag
(
_remote
,
GIT_REMOTE_DOWNLOAD_TAGS_ALL
);
cl_git_pass
(
git_remote_save
(
_remote
));
cl_git_pass
(
git_config_get_string
(
&
opt
,
cfg
,
"remote.test.tagopt"
));
cl_assert
(
!
strcmp
(
opt
,
"--tags"
)
);
cl_assert
_equal_s
(
"--tags"
,
opt
);
git_remote_set_autotag
(
_remote
,
GIT_REMOTE_DOWNLOAD_TAGS_NONE
);
cl_git_pass
(
git_remote_save
(
_remote
));
cl_git_pass
(
git_config_get_string
(
&
opt
,
cfg
,
"remote.test.tagopt"
));
cl_assert
(
!
strcmp
(
opt
,
"--no-tags"
)
);
cl_assert
_equal_s
(
"--no-tags"
,
opt
);
git_remote_set_autotag
(
_remote
,
GIT_REMOTE_DOWNLOAD_TAGS_AUTO
);
cl_git_pass
(
git_remote_save
(
_remote
));
...
...
tests-clar/notes/notesref.c
View file @
4adb4815
...
...
@@ -45,20 +45,20 @@ void test_notes_notesref__config_corenotesref(void)
cl_git_pass
(
git_note_create
(
&
note_oid
,
_repo
,
_sig
,
_sig
,
NULL
,
&
oid
,
"test123test
\n
"
,
0
));
cl_git_pass
(
git_note_read
(
&
_note
,
_repo
,
NULL
,
&
oid
));
cl_assert
(
!
strcmp
(
git_note_message
(
_note
),
"test123test
\n
"
));
cl_assert
_equal_s
(
"test123test
\n
"
,
git_note_message
(
_note
));
cl_assert
(
!
git_oid_cmp
(
git_note_oid
(
_note
),
&
note_oid
));
git_note_free
(
_note
);
cl_git_pass
(
git_note_read
(
&
_note
,
_repo
,
"refs/notes/mydefaultnotesref"
,
&
oid
));
cl_assert
(
!
strcmp
(
git_note_message
(
_note
),
"test123test
\n
"
));
cl_assert
_equal_s
(
"test123test
\n
"
,
git_note_message
(
_note
));
cl_assert
(
!
git_oid_cmp
(
git_note_oid
(
_note
),
&
note_oid
));
cl_git_pass
(
git_note_default_ref
(
&
default_ref
,
_repo
));
cl_assert
(
!
strcmp
(
default_ref
,
"refs/notes/mydefaultnotesref"
)
);
cl_assert
_equal_s
(
"refs/notes/mydefaultnotesref"
,
default_ref
);
cl_git_pass
(
git_config_delete_entry
(
_cfg
,
"core.notesRef"
));
cl_git_pass
(
git_note_default_ref
(
&
default_ref
,
_repo
));
cl_assert
(
!
strcmp
(
default_ref
,
GIT_NOTES_DEFAULT_REF
)
);
cl_assert
_equal_s
(
GIT_NOTES_DEFAULT_REF
,
default_ref
);
}
tests-clar/refs/branches/delete.c
View file @
4adb4815
...
...
@@ -35,7 +35,7 @@ void test_refs_branches_delete__can_not_delete_a_branch_pointed_at_by_HEAD(void)
/* Ensure HEAD targets the local master branch */
cl_git_pass
(
git_reference_lookup
(
&
head
,
repo
,
GIT_HEAD_FILE
));
cl_assert
(
strcmp
(
"refs/heads/master"
,
git_reference_symbolic_target
(
head
))
==
0
);
cl_assert
_equal_s
(
"refs/heads/master"
,
git_reference_symbolic_target
(
head
)
);
git_reference_free
(
head
);
cl_git_pass
(
git_branch_lookup
(
&
branch
,
repo
,
"master"
,
GIT_BRANCH_LOCAL
));
...
...
tests-clar/refs/normalize.c
View file @
4adb4815
...
...
@@ -14,7 +14,7 @@ static void ensure_refname_normalized(
cl_git_pass
(
git_reference_normalize_name
(
buffer_out
,
sizeof
(
buffer_out
),
input_refname
,
flags
));
cl_assert_equal_
i
(
0
,
strcmp
(
buffer_out
,
expected_refname
)
);
cl_assert_equal_
s
(
expected_refname
,
buffer_out
);
}
static
void
ensure_refname_invalid
(
unsigned
int
flags
,
const
char
*
input_refname
)
...
...
tests-clar/refs/unicode.c
View file @
4adb4815
...
...
@@ -28,14 +28,14 @@ void test_refs_unicode__create_and_lookup(void)
/* Create the reference */
cl_git_pass
(
git_reference_lookup
(
&
ref0
,
repo
,
master
));
cl_git_pass
(
git_reference_create
(
&
ref1
,
repo
,
REFNAME
,
git_reference_target
(
ref0
),
0
));
cl_assert
(
strcmp
(
REFNAME
,
git_reference_name
(
ref1
))
==
0
);
cl_assert
_equal_s
(
REFNAME
,
git_reference_name
(
ref1
)
);
/* Lookup the reference in a different instance of the repository */
cl_git_pass
(
git_repository_open
(
&
repo2
,
"testrepo.git"
));
cl_git_pass
(
git_reference_lookup
(
&
ref2
,
repo2
,
REFNAME
));
cl_assert
(
git_oid_cmp
(
git_reference_target
(
ref1
),
git_reference_target
(
ref2
))
==
0
);
cl_assert
(
strcmp
(
REFNAME
,
git_reference_name
(
ref2
))
==
0
);
cl_assert
_equal_s
(
REFNAME
,
git_reference_name
(
ref2
)
);
git_reference_free
(
ref0
);
git_reference_free
(
ref1
);
...
...
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