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
fdb82dcd
Commit
fdb82dcd
authored
Jun 07, 2015
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3175 from git-up/build_warnings
Fixed build warnings on Xcode 6.1
parents
3c4442a2
9f3c18e2
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
10 deletions
+21
-10
src/odb.c
+1
-1
src/transports/cred.c
+6
-0
tests/core/path.c
+1
-1
tests/diff/index.c
+1
-1
tests/diff/workdir.c
+1
-1
tests/index/addall.c
+2
-3
tests/stash/apply.c
+7
-1
tests/status/worktree.c
+2
-2
No files found.
src/odb.c
View file @
fdb82dcd
...
...
@@ -53,7 +53,7 @@ static int load_alternates(git_odb *odb, const char *objects_dir, int alternate_
int
git_odb__format_object_header
(
char
*
hdr
,
size_t
n
,
git_off_t
obj_len
,
git_otype
obj_type
)
{
const
char
*
type_str
=
git_object_type2string
(
obj_type
);
int
len
=
p_snprintf
(
hdr
,
n
,
"%s %
"
PRIuZ
,
type_str
,
obj_len
);
int
len
=
p_snprintf
(
hdr
,
n
,
"%s %
lld"
,
type_str
,
obj_len
);
assert
(
len
>
0
&&
len
<=
(
int
)
n
);
return
len
+
1
;
}
...
...
src/transports/cred.c
View file @
fdb82dcd
...
...
@@ -209,6 +209,12 @@ int git_cred_ssh_key_memory_new(
passphrase
,
GIT_CREDTYPE_SSH_MEMORY
);
#else
GIT_UNUSED
(
cred
);
GIT_UNUSED
(
username
);
GIT_UNUSED
(
publickey
);
GIT_UNUSED
(
privatekey
);
GIT_UNUSED
(
passphrase
);
giterr_set
(
GITERR_INVALID
,
"This version of libgit2 was not built with ssh memory credentials."
);
return
-
1
;
...
...
tests/core/path.c
View file @
fdb82dcd
...
...
@@ -492,7 +492,7 @@ void test_core_path__13_cannot_prettify_a_non_existing_file(void)
{
git_buf
p
=
GIT_BUF_INIT
;
cl_
must_pass
(
git_path_exists
(
NON_EXISTING_FILEPATH
)
==
false
);
cl_
assert_equal_b
(
git_path_exists
(
NON_EXISTING_FILEPATH
),
false
);
cl_assert_equal_i
(
GIT_ENOTFOUND
,
git_path_prettify
(
&
p
,
NON_EXISTING_FILEPATH
,
NULL
));
cl_assert_equal_i
(
GIT_ENOTFOUND
,
git_path_prettify
(
&
p
,
NON_EXISTING_FILEPATH
"/so-do-i"
,
NULL
));
...
...
tests/diff/index.c
View file @
fdb82dcd
...
...
@@ -168,7 +168,7 @@ static void do_conflicted_diff(diff_expects *exp, unsigned long flags)
const
char
*
a_commit
=
"26a125ee1bf"
;
/* the current HEAD */
git_tree
*
a
=
resolve_commit_oid_to_tree
(
g_repo
,
a_commit
);
git_diff_options
opts
=
GIT_DIFF_OPTIONS_INIT
;
git_index_entry
ancestor
=
{
0
},
ours
=
{
0
},
theirs
=
{
0
};
git_index_entry
ancestor
=
{
{
0
}},
ours
=
{{
0
}},
theirs
=
{{
0
}
};
git_diff
*
diff
=
NULL
;
git_index
*
index
;
...
...
tests/diff/workdir.c
View file @
fdb82dcd
...
...
@@ -73,7 +73,7 @@ void test_diff_workdir__to_index_with_conflicts(void)
git_diff_options
opts
=
GIT_DIFF_OPTIONS_INIT
;
git_diff
*
diff
=
NULL
;
git_index
*
index
;
git_index_entry
our_entry
=
{
0
},
their_entry
=
{
0
};
git_index_entry
our_entry
=
{
{
0
}},
their_entry
=
{{
0
}
};
diff_expects
exp
=
{
0
};
g_repo
=
cl_git_sandbox_init
(
"status"
);
...
...
tests/index/addall.c
View file @
fdb82dcd
...
...
@@ -288,7 +288,6 @@ void test_index_addall__repo_lifecycle(void)
void
test_index_addall__files_in_folders
(
void
)
{
git_index
*
index
;
git_strarray
paths
=
{
NULL
,
0
};
addall_create_test_repo
(
true
);
...
...
@@ -408,7 +407,7 @@ void test_index_addall__adds_conflicts(void)
cl_git_pass
(
git_reference_lookup
(
&
ref
,
g_repo
,
"refs/heads/branch"
));
cl_git_pass
(
git_annotated_commit_from_ref
(
&
annotated
,
g_repo
,
ref
));
cl_git_pass
(
git_merge
(
g_repo
,
&
annotated
,
1
,
NULL
,
NULL
));
cl_git_pass
(
git_merge
(
g_repo
,
(
const
git_annotated_commit
**
)
&
annotated
,
1
,
NULL
,
NULL
));
check_status
(
g_repo
,
0
,
1
,
2
,
0
,
0
,
0
,
0
,
1
);
cl_git_pass
(
git_index_add_all
(
index
,
NULL
,
0
,
NULL
,
NULL
));
...
...
@@ -433,7 +432,7 @@ void test_index_addall__removes_deleted_conflicted_files(void)
cl_git_pass
(
git_reference_lookup
(
&
ref
,
g_repo
,
"refs/heads/branch"
));
cl_git_pass
(
git_annotated_commit_from_ref
(
&
annotated
,
g_repo
,
ref
));
cl_git_pass
(
git_merge
(
g_repo
,
&
annotated
,
1
,
NULL
,
NULL
));
cl_git_pass
(
git_merge
(
g_repo
,
(
const
git_annotated_commit
**
)
&
annotated
,
1
,
NULL
,
NULL
));
check_status
(
g_repo
,
0
,
1
,
2
,
0
,
0
,
0
,
0
,
1
);
cl_git_rmfile
(
"merge-resolve/conflicting.txt"
);
...
...
tests/stash/apply.c
View file @
fdb82dcd
...
...
@@ -254,6 +254,11 @@ int checkout_notify(
{
struct
seen_paths
*
seen_paths
=
(
struct
seen_paths
*
)
payload
;
GIT_UNUSED
(
why
);
GIT_UNUSED
(
baseline
);
GIT_UNUSED
(
target
);
GIT_UNUSED
(
workdir
);
if
(
strcmp
(
path
,
"what"
)
==
0
)
seen_paths
->
what
=
1
;
else
if
(
strcmp
(
path
,
"how"
)
==
0
)
...
...
@@ -318,6 +323,8 @@ int aborting_progress_cb(
git_stash_apply_progress_t
progress
,
void
*
payload
)
{
GIT_UNUSED
(
payload
);
if
(
progress
==
GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED
)
return
-
44
;
...
...
@@ -327,7 +334,6 @@ int aborting_progress_cb(
void
test_stash_apply__progress_cb_can_abort
(
void
)
{
git_stash_apply_options
opts
=
GIT_STASH_APPLY_OPTIONS_INIT
;
git_stash_apply_progress_t
progress
=
GIT_STASH_APPLY_PROGRESS_NONE
;
opts
.
progress_cb
=
aborting_progress_cb
;
...
...
tests/status/worktree.c
View file @
fdb82dcd
...
...
@@ -649,10 +649,10 @@ void test_status_worktree__conflict_has_no_oid(void)
{
git_repository
*
repo
=
cl_git_sandbox_init
(
"status"
);
git_index
*
index
;
git_index_entry
entry
=
{
0
};
git_index_entry
entry
=
{
{
0
}
};
git_status_list
*
statuslist
;
const
git_status_entry
*
status
;
git_oid
zero_id
=
{
0
};
git_oid
zero_id
=
{
{
0
}
};
entry
.
mode
=
0100644
;
entry
.
path
=
"modified_file"
;
...
...
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