Skip to content

Commit 7ca1584

Browse files
committed
Conforming to libgit2 coding style.
1 parent 46e4d82 commit 7ca1584

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
.lock-wafbuild
1515
.waf*
1616
build/
17+
buildx64/
1718
build-amiga/
1819
tests/tmp/
1920
msvc/Debug/

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ IF (MSVC)
221221

222222
# /GF - String pooling
223223
# /MP - Parallel build
224-
SET(CMAKE_C_FLAGS "/GF /MP /nologo ${CMAKE_C_FLAGS}")
224+
SET(CMAKE_C_FLAGS "/GF /MP /wd4244 /wd4267 /nologo ${CMAKE_C_FLAGS}")
225225

226226
IF (STDCALL)
227227
# /Gz - stdcall calling convention

src/revwalk.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ static int process_commit(git_revwalk *walk, git_commit_list_node *commit, int h
8282
int error;
8383

8484
if (!hide && walk->hide_cb)
85-
{
8685
hide = walk->hide_cb(&commit->oid, walk->hide_cb_payload);
87-
}
8886

8987
if (hide && mark_uninteresting(commit) < 0)
9088
return -1;
@@ -585,8 +583,7 @@ int git_revwalk_add_hide_cb(
585583
if (walk->walking)
586584
git_revwalk_reset(walk);
587585

588-
if (walk->hide_cb)
589-
{
586+
if (walk->hide_cb) {
590587
/* There is already a callback added */
591588
giterr_set(GITERR_INVALID, "There is already a callback added to hide commits in revision walker.");
592589
return -1;

tests/revwalk/hidecb.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ void test_revwalk_hidecb__initialize(void)
3535
cl_git_pass(git_oid_fromstr(&_head_id, commit_head));
3636

3737
for (i = 0; i < commit_count; i++)
38-
{
3938
cl_git_pass(git_oid_fromstr(&commit_ids[i], commit_strs[i]));
40-
}
4139

4240
}
4341

@@ -73,7 +71,7 @@ static int hide_commit_cb(const git_oid *commit_id, void *data)
7371
static int hide_commit_use_payload_cb(const git_oid *commit_id, void *data)
7472
{
7573
git_oid *hide_commit_id = data;
76-
if (0 == git_oid_cmp(commit_id, hide_commit_id))
74+
if (git_oid_cmp(commit_id, hide_commit_id) == 0)
7775
return 1;
7876
else
7977
return 0;
@@ -197,3 +195,4 @@ void test_revwalk_hidecb__test_payload(void)
197195

198196
git_revwalk_free(walk);
199197
}
198+

0 commit comments

Comments
 (0)