mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 22:39:38 +00:00
Conforming to libgit2 coding style.
This commit is contained in:
parent
46e4d82d6f
commit
7ca1584b47
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,6 +14,7 @@
|
|||||||
.lock-wafbuild
|
.lock-wafbuild
|
||||||
.waf*
|
.waf*
|
||||||
build/
|
build/
|
||||||
|
buildx64/
|
||||||
build-amiga/
|
build-amiga/
|
||||||
tests/tmp/
|
tests/tmp/
|
||||||
msvc/Debug/
|
msvc/Debug/
|
||||||
|
@ -221,7 +221,7 @@ IF (MSVC)
|
|||||||
|
|
||||||
# /GF - String pooling
|
# /GF - String pooling
|
||||||
# /MP - Parallel build
|
# /MP - Parallel build
|
||||||
SET(CMAKE_C_FLAGS "/GF /MP /nologo ${CMAKE_C_FLAGS}")
|
SET(CMAKE_C_FLAGS "/GF /MP /wd4244 /wd4267 /nologo ${CMAKE_C_FLAGS}")
|
||||||
|
|
||||||
IF (STDCALL)
|
IF (STDCALL)
|
||||||
# /Gz - stdcall calling convention
|
# /Gz - stdcall calling convention
|
||||||
|
@ -82,9 +82,7 @@ static int process_commit(git_revwalk *walk, git_commit_list_node *commit, int h
|
|||||||
int error;
|
int error;
|
||||||
|
|
||||||
if (!hide && walk->hide_cb)
|
if (!hide && walk->hide_cb)
|
||||||
{
|
|
||||||
hide = walk->hide_cb(&commit->oid, walk->hide_cb_payload);
|
hide = walk->hide_cb(&commit->oid, walk->hide_cb_payload);
|
||||||
}
|
|
||||||
|
|
||||||
if (hide && mark_uninteresting(commit) < 0)
|
if (hide && mark_uninteresting(commit) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -585,8 +583,7 @@ int git_revwalk_add_hide_cb(
|
|||||||
if (walk->walking)
|
if (walk->walking)
|
||||||
git_revwalk_reset(walk);
|
git_revwalk_reset(walk);
|
||||||
|
|
||||||
if (walk->hide_cb)
|
if (walk->hide_cb) {
|
||||||
{
|
|
||||||
/* There is already a callback added */
|
/* There is already a callback added */
|
||||||
giterr_set(GITERR_INVALID, "There is already a callback added to hide commits in revision walker.");
|
giterr_set(GITERR_INVALID, "There is already a callback added to hide commits in revision walker.");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -35,9 +35,7 @@ void test_revwalk_hidecb__initialize(void)
|
|||||||
cl_git_pass(git_oid_fromstr(&_head_id, commit_head));
|
cl_git_pass(git_oid_fromstr(&_head_id, commit_head));
|
||||||
|
|
||||||
for (i = 0; i < commit_count; i++)
|
for (i = 0; i < commit_count; i++)
|
||||||
{
|
|
||||||
cl_git_pass(git_oid_fromstr(&commit_ids[i], commit_strs[i]));
|
cl_git_pass(git_oid_fromstr(&commit_ids[i], commit_strs[i]));
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +71,7 @@ static int hide_commit_cb(const git_oid *commit_id, void *data)
|
|||||||
static int hide_commit_use_payload_cb(const git_oid *commit_id, void *data)
|
static int hide_commit_use_payload_cb(const git_oid *commit_id, void *data)
|
||||||
{
|
{
|
||||||
git_oid *hide_commit_id = data;
|
git_oid *hide_commit_id = data;
|
||||||
if (0 == git_oid_cmp(commit_id, hide_commit_id))
|
if (git_oid_cmp(commit_id, hide_commit_id) == 0)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
@ -197,3 +195,4 @@ void test_revwalk_hidecb__test_payload(void)
|
|||||||
|
|
||||||
git_revwalk_free(walk);
|
git_revwalk_free(walk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user