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
66566516
Commit
66566516
authored
Sep 08, 2013
by
Linquize
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warning
parent
ef6389ad
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
18 deletions
+18
-18
include/git2/index.h
+1
-1
src/attr_file.c
+1
-1
src/buffer.c
+1
-1
src/config_file.c
+2
-2
src/diff.c
+2
-1
src/index.c
+5
-5
src/odb.c
+1
-2
src/oid.c
+1
-1
src/remote.c
+2
-2
src/transports/winhttp.c
+2
-2
No files found.
include/git2/index.h
View file @
66566516
...
...
@@ -219,7 +219,7 @@ GIT_EXTERN(unsigned int) git_index_caps(const git_index *index);
* @param caps A combination of GIT_INDEXCAP values
* @return 0 on success, -1 on failure
*/
GIT_EXTERN
(
int
)
git_index_set_caps
(
git_index
*
index
,
unsigned
int
caps
);
GIT_EXTERN
(
int
)
git_index_set_caps
(
git_index
*
index
,
int
caps
);
/**
* Update the contents of an existing index object in memory
...
...
src/attr_file.c
View file @
66566516
...
...
@@ -39,7 +39,7 @@ int git_attr_file__new(
attrs
->
key
=
git_pool_malloc
(
attrs
->
pool
,
(
uint32_t
)
len
+
3
);
GITERR_CHECK_ALLOC
(
attrs
->
key
);
attrs
->
key
[
0
]
=
'0'
+
from
;
attrs
->
key
[
0
]
=
'0'
+
(
char
)
from
;
attrs
->
key
[
1
]
=
'#'
;
memcpy
(
&
attrs
->
key
[
2
],
path
,
len
);
attrs
->
key
[
len
+
2
]
=
'\0'
;
...
...
src/buffer.c
View file @
66566516
...
...
@@ -137,7 +137,7 @@ int git_buf_puts(git_buf *buf, const char *string)
return
git_buf_put
(
buf
,
string
,
strlen
(
string
));
}
static
const
char
b64str
[
64
]
=
static
const
char
b64str
[]
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
;
int
git_buf_put_base64
(
git_buf
*
buf
,
const
char
*
data
,
size_t
len
)
...
...
src/config_file.c
View file @
66566516
...
...
@@ -125,7 +125,7 @@ int git_config_file_normalize_section(char *start, char *end)
if
(
end
&&
scan
>=
end
)
break
;
if
(
isalnum
(
*
scan
))
*
scan
=
tolower
(
*
scan
);
*
scan
=
(
char
)
tolower
(
*
scan
);
else
if
(
*
scan
!=
'-'
||
scan
==
start
)
return
GIT_EINVALIDSPEC
;
}
...
...
@@ -737,7 +737,7 @@ static int parse_section_header_ext(diskfile_backend *cfg, const char *line, con
break
;
}
git_buf_putc
(
&
buf
,
c
);
git_buf_putc
(
&
buf
,
(
char
)
c
);
}
while
((
c
=
line
[
rpos
++
])
!=
']'
);
*
section_name
=
git_buf_detach
(
&
buf
);
...
...
src/diff.c
View file @
66566516
...
...
@@ -440,7 +440,8 @@ static int diff_list_apply_options(
/* If not given explicit `opts`, check `diff.xyz` configs */
if
(
!
opts
)
{
diff
->
opts
.
context_lines
=
config_int
(
cfg
,
"diff.context"
,
3
);
int
context
=
config_int
(
cfg
,
"diff.context"
,
3
);
diff
->
opts
.
context_lines
=
context
>=
0
?
(
uint16_t
)
context
:
3
;
/* add other defaults here */
}
...
...
src/index.c
View file @
66566516
...
...
@@ -408,9 +408,9 @@ static int create_index_error(int error, const char *msg)
return
error
;
}
int
git_index_set_caps
(
git_index
*
index
,
unsigned
int
caps
)
int
git_index_set_caps
(
git_index
*
index
,
int
caps
)
{
int
old_ignore_case
;
unsigned
int
old_ignore_case
;
assert
(
index
);
...
...
@@ -438,7 +438,7 @@ int git_index_set_caps(git_index *index, unsigned int caps)
}
if
(
old_ignore_case
!=
index
->
ignore_case
)
{
git_index__set_ignore_case
(
index
,
index
->
ignore_case
);
git_index__set_ignore_case
(
index
,
(
bool
)
index
->
ignore_case
);
}
return
0
;
...
...
@@ -2092,7 +2092,7 @@ int git_index_add_all(
/* check if path actually matches */
if
(
!
git_pathspec__match
(
&
ps
.
pathspec
,
wd
->
path
,
no_fnmatch
,
ignorecase
,
&
match
,
NULL
))
&
ps
.
pathspec
,
wd
->
path
,
no_fnmatch
,
(
bool
)
ignorecase
,
&
match
,
NULL
))
continue
;
/* skip ignored items that are not already in the index */
...
...
@@ -2184,7 +2184,7 @@ static int index_apply_to_all(
/* check if path actually matches */
if
(
!
git_pathspec__match
(
&
ps
.
pathspec
,
entry
->
path
,
false
,
index
->
ignore_case
,
&
ps
.
pathspec
,
entry
->
path
,
false
,
(
bool
)
index
->
ignore_case
,
&
match
,
NULL
))
continue
;
...
...
src/odb.c
View file @
66566516
...
...
@@ -168,7 +168,6 @@ int git_odb__hashfd(git_oid *out, git_file fd, size_t size, git_otype type)
error
=
-
1
;
goto
done
;
return
-
1
;
}
error
=
git_hash_final
(
out
,
&
ctx
);
...
...
@@ -621,7 +620,7 @@ int git_odb_exists(git_odb *db, const git_oid *id)
git_odb_backend
*
b
=
internal
->
backend
;
if
(
b
->
exists
!=
NULL
)
found
=
b
->
exists
(
b
,
id
);
found
=
(
bool
)
b
->
exists
(
b
,
id
);
}
return
(
int
)
found
;
...
...
src/oid.c
View file @
66566516
...
...
@@ -211,7 +211,7 @@ int git_oid_strcmp(const git_oid *oid_a, const char *str)
for
(
a
=
oid_a
->
id
;
*
str
&&
(
a
-
oid_a
->
id
)
<
GIT_OID_RAWSZ
;
++
a
)
{
if
((
hexval
=
git__fromhex
(
*
str
++
))
<
0
)
return
-
1
;
strval
=
hexval
<<
4
;
strval
=
(
unsigned
char
)(
hexval
<<
4
)
;
if
(
*
str
)
{
if
((
hexval
=
git__fromhex
(
*
str
++
))
<
0
)
return
-
1
;
...
...
src/remote.c
View file @
66566516
...
...
@@ -362,7 +362,7 @@ cleanup:
static
int
update_config_refspec
(
const
git_remote
*
remote
,
git_config
*
config
,
int
direction
)
{
git_buf
name
=
GIT_BUF_INIT
;
int
push
;
unsigned
int
push
;
const
char
*
dir
;
size_t
i
;
int
error
=
0
;
...
...
@@ -1549,7 +1549,7 @@ int git_remote_add_push(git_remote *remote, const char *refspec)
return
add_refspec
(
remote
,
refspec
,
false
);
}
static
int
copy_refspecs
(
git_strarray
*
array
,
git_remote
*
remote
,
int
push
)
static
int
copy_refspecs
(
git_strarray
*
array
,
git_remote
*
remote
,
unsigned
int
push
)
{
size_t
i
;
git_vector
refspecs
;
...
...
src/transports/winhttp.c
View file @
66566516
...
...
@@ -195,7 +195,7 @@ static int winhttp_stream_connect(winhttp_stream *s)
}
/* Set proxy if necessary */
if
(
git_remote__get_http_proxy
(
t
->
owner
->
owner
,
t
->
use_ssl
,
&
proxy_url
)
<
0
)
if
(
git_remote__get_http_proxy
(
t
->
owner
->
owner
,
!!
t
->
use_ssl
,
&
proxy_url
)
<
0
)
goto
on_error
;
if
(
proxy_url
)
{
...
...
@@ -939,7 +939,7 @@ static int winhttp_connect(
t
->
connection
=
WinHttpConnect
(
t
->
session
,
host
,
port
,
(
INTERNET_PORT
)
port
,
0
);
if
(
!
t
->
connection
)
{
...
...
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