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
379c4646
Commit
379c4646
authored
Sep 09, 2021
by
punkymaniac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix coding style for pointer
Make some syntax change to follow coding style.
parent
f1b89a20
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
76 additions
and
76 deletions
+76
-76
include/git2/clone.h
+1
-1
include/git2/notes.h
+2
-2
include/git2/remote.h
+3
-3
include/git2/repository.h
+5
-5
include/git2/stash.h
+1
-1
src/blame.c
+4
-4
src/blame_git.c
+1
-1
src/buffer.c
+2
-2
src/clone.c
+1
-1
src/commit_graph.c
+1
-1
src/config.c
+1
-1
src/config_file.c
+2
-2
src/describe.c
+1
-1
src/hash/sha1/sha1dc/sha1.c
+8
-8
src/merge.c
+1
-1
src/notes.c
+3
-3
src/path.c
+1
-1
src/path.h
+1
-1
src/refdb_fs.c
+1
-1
src/refs.c
+2
-2
src/refspec.c
+1
-1
src/remote.c
+1
-1
src/repository.c
+5
-5
src/reset.c
+1
-1
src/revparse.c
+4
-4
src/stash.c
+1
-1
src/streams/openssl_legacy.c
+1
-1
src/streams/openssl_legacy.h
+1
-1
src/trailer.c
+1
-1
src/transports/ssh.c
+4
-4
src/transports/winhttp.c
+1
-1
src/win32/findfile.c
+1
-1
src/win32/posix.h
+6
-6
src/win32/posix_w32.c
+6
-6
No files found.
include/git2/clone.h
View file @
379c4646
...
...
@@ -133,7 +133,7 @@ typedef struct git_clone_options {
* The name of the branch to checkout. NULL means use the
* remote's default branch.
*/
const
char
*
checkout_branch
;
const
char
*
checkout_branch
;
/**
* A callback used to create the new repository into which to
...
...
include/git2/notes.h
View file @
379c4646
...
...
@@ -84,8 +84,8 @@ GIT_EXTERN(void) git_note_iterator_free(git_note_iterator *it);
* (negative value)
*/
GIT_EXTERN
(
int
)
git_note_next
(
git_oid
*
note_id
,
git_oid
*
annotated_id
,
git_oid
*
note_id
,
git_oid
*
annotated_id
,
git_note_iterator
*
it
);
...
...
include/git2/remote.h
View file @
379c4646
...
...
@@ -243,7 +243,7 @@ GIT_EXTERN(const char *) git_remote_pushurl(const git_remote *remote);
* @param url the url to set
* @return 0 or an error value
*/
GIT_EXTERN
(
int
)
git_remote_set_url
(
git_repository
*
repo
,
const
char
*
remote
,
const
char
*
url
);
GIT_EXTERN
(
int
)
git_remote_set_url
(
git_repository
*
repo
,
const
char
*
remote
,
const
char
*
url
);
/**
* Set the remote's url for pushing in the configuration.
...
...
@@ -257,7 +257,7 @@ GIT_EXTERN(int) git_remote_set_url(git_repository *repo, const char *remote, con
* @param url the url to set
* @return 0, or an error code
*/
GIT_EXTERN
(
int
)
git_remote_set_pushurl
(
git_repository
*
repo
,
const
char
*
remote
,
const
char
*
url
);
GIT_EXTERN
(
int
)
git_remote_set_pushurl
(
git_repository
*
repo
,
const
char
*
remote
,
const
char
*
url
);
/**
* Set the url for this particular url instance. The URL in the
...
...
@@ -451,7 +451,7 @@ typedef int GIT_CALLBACK(git_push_transfer_progress_cb)(
unsigned
int
current
,
unsigned
int
total
,
size_t
bytes
,
void
*
payload
);
void
*
payload
);
/**
* Represents an update which will be performed on the remote during push
...
...
include/git2/repository.h
View file @
379c4646
...
...
@@ -797,8 +797,8 @@ GIT_EXTERN(int) git_repository_hashfile(
* @return 0 on success, or an error code
*/
GIT_EXTERN
(
int
)
git_repository_set_head
(
git_repository
*
repo
,
const
char
*
refname
);
git_repository
*
repo
,
const
char
*
refname
);
/**
* Make the repository HEAD directly point to the Commit.
...
...
@@ -817,8 +817,8 @@ GIT_EXTERN(int) git_repository_set_head(
* @return 0 on success, or an error code
*/
GIT_EXTERN
(
int
)
git_repository_set_head_detached
(
git_repository
*
repo
,
const
git_oid
*
commitish
);
git_repository
*
repo
,
const
git_oid
*
commitish
);
/**
* Make the repository HEAD directly point to the Commit.
...
...
@@ -854,7 +854,7 @@ GIT_EXTERN(int) git_repository_set_head_detached_from_annotated(
* branch or an error code
*/
GIT_EXTERN
(
int
)
git_repository_detach_head
(
git_repository
*
repo
);
git_repository
*
repo
);
/**
* Repository state
...
...
include/git2/stash.h
View file @
379c4646
...
...
@@ -200,7 +200,7 @@ GIT_EXTERN(int) git_stash_apply(
*/
typedef
int
GIT_CALLBACK
(
git_stash_cb
)(
size_t
index
,
const
char
*
message
,
const
char
*
message
,
const
git_oid
*
stash_id
,
void
*
payload
);
...
...
src/blame.c
View file @
379c4646
...
...
@@ -59,7 +59,7 @@ static bool hunk_starts_at_or_after_line(git_blame_hunk *hunk, size_t line)
return
line
<=
hunk
->
final_start_line_number
;
}
static
git_blame_hunk
*
new_hunk
(
static
git_blame_hunk
*
new_hunk
(
size_t
start
,
size_t
lines
,
size_t
orig_start
,
...
...
@@ -84,7 +84,7 @@ static void free_hunk(git_blame_hunk *hunk)
git__free
(
hunk
);
}
static
git_blame_hunk
*
dup_hunk
(
git_blame_hunk
*
hunk
)
static
git_blame_hunk
*
dup_hunk
(
git_blame_hunk
*
hunk
)
{
git_blame_hunk
*
newhunk
=
new_hunk
(
hunk
->
final_start_line_number
,
...
...
@@ -122,7 +122,7 @@ static void shift_hunks_by(git_vector *v, size_t start_line, int shift_by)
}
}
git_blame
*
git_blame__alloc
(
git_blame
*
git_blame__alloc
(
git_repository
*
repo
,
git_blame_options
opts
,
const
char
*
path
)
...
...
@@ -299,7 +299,7 @@ static int index_blob_lines(git_blame *blame)
return
blame
->
num_lines
;
}
static
git_blame_hunk
*
hunk_from_entry
(
git_blame__entry
*
e
,
git_blame
*
blame
)
static
git_blame_hunk
*
hunk_from_entry
(
git_blame__entry
*
e
,
git_blame
*
blame
)
{
git_blame_hunk
*
h
=
new_hunk
(
e
->
lno
+
1
,
e
->
num_lines
,
e
->
s_lno
+
1
,
e
->
suspect
->
path
);
...
...
src/blame_git.c
View file @
379c4646
...
...
@@ -429,7 +429,7 @@ static int paths_on_dup(void **old, void *new)
return
-
1
;
}
static
git_blame__origin
*
find_origin
(
static
git_blame__origin
*
find_origin
(
git_blame
*
blame
,
git_commit
*
parent
,
git_blame__origin
*
origin
)
...
...
src/buffer.c
View file @
379c4646
...
...
@@ -670,7 +670,7 @@ int git_buf_join_n(git_buf *buf, char separator, int nbuf, ...)
va_start
(
ap
,
nbuf
);
for
(
i
=
0
;
i
<
nbuf
;
++
i
)
{
const
char
*
segment
;
const
char
*
segment
;
size_t
segment_len
;
segment
=
va_arg
(
ap
,
const
char
*
);
...
...
@@ -702,7 +702,7 @@ int git_buf_join_n(git_buf *buf, char separator, int nbuf, ...)
va_start
(
ap
,
nbuf
);
for
(
i
=
0
;
i
<
nbuf
;
++
i
)
{
const
char
*
segment
;
const
char
*
segment
;
size_t
segment_len
;
segment
=
va_arg
(
ap
,
const
char
*
);
...
...
src/clone.c
View file @
379c4646
...
...
@@ -265,7 +265,7 @@ static int update_head_to_branch(
{
int
retcode
;
git_buf
remote_branch_name
=
GIT_BUF_INIT
;
git_reference
*
remote_ref
=
NULL
;
git_reference
*
remote_ref
=
NULL
;
git_buf
default_branch
=
GIT_BUF_INIT
;
GIT_ASSERT_ARG
(
remote
);
...
...
src/commit_graph.c
View file @
379c4646
...
...
@@ -728,7 +728,7 @@ int git_commit_graph_writer_add_revwalk(git_commit_graph_writer *w, git_revwalk
git_oid
id
;
git_repository
*
repo
=
git_revwalk_repository
(
walk
);
git_commit
*
commit
;
struct
packed_commit
*
packed_commit
;
struct
packed_commit
*
packed_commit
;
while
((
git_revwalk_next
(
&
id
,
walk
))
==
0
)
{
error
=
git_commit_lookup
(
&
commit
,
repo
,
&
id
);
...
...
src/config.c
View file @
379c4646
...
...
@@ -511,7 +511,7 @@ int git_config_backend_foreach_match(
void
*
payload
)
{
git_config_entry
*
entry
;
git_config_iterator
*
iter
;
git_config_iterator
*
iter
;
git_regexp
regex
;
int
error
=
0
;
...
...
src/config_file.c
View file @
379c4646
...
...
@@ -164,7 +164,7 @@ out:
return
error
;
}
static
void
config_file_clear_includes
(
config_file_backend
*
cfg
)
static
void
config_file_clear_includes
(
config_file_backend
*
cfg
)
{
config_file
*
include
;
uint32_t
i
;
...
...
@@ -1104,7 +1104,7 @@ static int write_on_eof(
/*
* This is pretty much the parsing, except we write out anything we don't have
*/
static
int
config_file_write
(
config_file_backend
*
cfg
,
const
char
*
orig_key
,
const
char
*
key
,
const
git_regexp
*
preg
,
const
char
*
value
)
static
int
config_file_write
(
config_file_backend
*
cfg
,
const
char
*
orig_key
,
const
char
*
key
,
const
git_regexp
*
preg
,
const
char
*
value
)
{
char
*
orig_section
=
NULL
,
*
section
=
NULL
,
*
orig_name
,
*
name
,
*
ldot
;
...
...
src/describe.c
View file @
379c4646
...
...
@@ -391,7 +391,7 @@ static int show_suffix(
git_buf
*
buf
,
int
depth
,
git_repository
*
repo
,
const
git_oid
*
id
,
const
git_oid
*
id
,
unsigned
int
abbrev_size
)
{
int
error
,
size
=
0
;
...
...
src/hash/sha1/sha1dc/sha1.c
View file @
379c4646
...
...
@@ -1710,7 +1710,7 @@ static void sha1_recompression_step(uint32_t step, uint32_t ihvin[5], uint32_t i
static
void
sha1_process
(
SHA1_CTX
*
ctx
,
const
uint32_t
block
[
16
])
static
void
sha1_process
(
SHA1_CTX
*
ctx
,
const
uint32_t
block
[
16
])
{
unsigned
i
,
j
;
uint32_t
ubc_dv_mask
[
DVMASKSIZE
]
=
{
0xFFFFFFFF
};
...
...
@@ -1762,7 +1762,7 @@ static void sha1_process(SHA1_CTX* ctx, const uint32_t block[16])
}
}
void
SHA1DCInit
(
SHA1_CTX
*
ctx
)
void
SHA1DCInit
(
SHA1_CTX
*
ctx
)
{
ctx
->
total
=
0
;
ctx
->
ihv
[
0
]
=
0x67452301
;
...
...
@@ -1778,7 +1778,7 @@ void SHA1DCInit(SHA1_CTX* ctx)
ctx
->
callback
=
NULL
;
}
void
SHA1DCSetSafeHash
(
SHA1_CTX
*
ctx
,
int
safehash
)
void
SHA1DCSetSafeHash
(
SHA1_CTX
*
ctx
,
int
safehash
)
{
if
(
safehash
)
ctx
->
safe_hash
=
1
;
...
...
@@ -1787,7 +1787,7 @@ void SHA1DCSetSafeHash(SHA1_CTX* ctx, int safehash)
}
void
SHA1DCSetUseUBC
(
SHA1_CTX
*
ctx
,
int
ubc_check
)
void
SHA1DCSetUseUBC
(
SHA1_CTX
*
ctx
,
int
ubc_check
)
{
if
(
ubc_check
)
ctx
->
ubc_check
=
1
;
...
...
@@ -1795,7 +1795,7 @@ void SHA1DCSetUseUBC(SHA1_CTX* ctx, int ubc_check)
ctx
->
ubc_check
=
0
;
}
void
SHA1DCSetUseDetectColl
(
SHA1_CTX
*
ctx
,
int
detect_coll
)
void
SHA1DCSetUseDetectColl
(
SHA1_CTX
*
ctx
,
int
detect_coll
)
{
if
(
detect_coll
)
ctx
->
detect_coll
=
1
;
...
...
@@ -1803,7 +1803,7 @@ void SHA1DCSetUseDetectColl(SHA1_CTX* ctx, int detect_coll)
ctx
->
detect_coll
=
0
;
}
void
SHA1DCSetDetectReducedRoundCollision
(
SHA1_CTX
*
ctx
,
int
reduced_round_coll
)
void
SHA1DCSetDetectReducedRoundCollision
(
SHA1_CTX
*
ctx
,
int
reduced_round_coll
)
{
if
(
reduced_round_coll
)
ctx
->
reduced_round_coll
=
1
;
...
...
@@ -1811,12 +1811,12 @@ void SHA1DCSetDetectReducedRoundCollision(SHA1_CTX* ctx, int reduced_round_coll)
ctx
->
reduced_round_coll
=
0
;
}
void
SHA1DCSetCallback
(
SHA1_CTX
*
ctx
,
collision_block_callback
callback
)
void
SHA1DCSetCallback
(
SHA1_CTX
*
ctx
,
collision_block_callback
callback
)
{
ctx
->
callback
=
callback
;
}
void
SHA1DCUpdate
(
SHA1_CTX
*
ctx
,
const
char
*
buf
,
size_t
len
)
void
SHA1DCUpdate
(
SHA1_CTX
*
ctx
,
const
char
*
buf
,
size_t
len
)
{
unsigned
left
,
fill
;
...
...
src/merge.c
View file @
379c4646
...
...
@@ -1151,7 +1151,7 @@ static void deletes_by_oid_free(git_oidmap *map) {
git_oidmap_free
(
map
);
}
static
int
deletes_by_oid_enqueue
(
git_oidmap
*
map
,
git_pool
*
pool
,
const
git_oid
*
id
,
size_t
idx
)
static
int
deletes_by_oid_enqueue
(
git_oidmap
*
map
,
git_pool
*
pool
,
const
git_oid
*
id
,
size_t
idx
)
{
deletes_by_oid_queue
*
queue
;
size_t
*
array_entry
;
...
...
src/notes.c
View file @
379c4646
...
...
@@ -674,7 +674,7 @@ void git_note_free(git_note *note)
}
static
int
process_entry_path
(
const
char
*
entry_path
,
const
char
*
entry_path
,
git_oid
*
annotated_object_id
)
{
int
error
=
0
;
...
...
@@ -796,8 +796,8 @@ cleanup:
}
int
git_note_next
(
git_oid
*
note_id
,
git_oid
*
annotated_id
,
git_oid
*
note_id
,
git_oid
*
annotated_id
,
git_note_iterator
*
it
)
{
int
error
;
...
...
src/path.c
View file @
379c4646
...
...
@@ -413,7 +413,7 @@ int git_path_to_dir(git_buf *path)
return
git_buf_oom
(
path
)
?
-
1
:
0
;
}
void
git_path_string_to_dir
(
char
*
path
,
size_t
size
)
void
git_path_string_to_dir
(
char
*
path
,
size_t
size
)
{
size_t
end
=
strlen
(
path
);
...
...
src/path.h
View file @
379c4646
...
...
@@ -85,7 +85,7 @@ extern int git_path_to_dir(git_buf *path);
/**
* Ensure string has a trailing '/' if there is space for it.
*/
extern
void
git_path_string_to_dir
(
char
*
path
,
size_t
size
);
extern
void
git_path_string_to_dir
(
char
*
path
,
size_t
size
);
/**
* Taken from git.git; returns nonzero if the given path is "." or "..".
...
...
src/refdb_fs.c
View file @
379c4646
...
...
@@ -764,7 +764,7 @@ static bool ref_is_available(
static
int
reference_path_available
(
refdb_fs_backend
*
backend
,
const
char
*
new_ref
,
const
char
*
old_ref
,
const
char
*
old_ref
,
int
force
)
{
size_t
i
;
...
...
src/refs.c
View file @
379c4646
...
...
@@ -249,7 +249,7 @@ int git_reference_dwim(git_reference **out, git_repository *repo, const char *re
git_reference
*
ref
;
git_buf
refnamebuf
=
GIT_BUF_INIT
,
name
=
GIT_BUF_INIT
;
static
const
char
*
formatters
[]
=
{
static
const
char
*
formatters
[]
=
{
"%s"
,
GIT_REFS_DIR
"%s"
,
GIT_REFS_TAGS_DIR
"%s"
,
...
...
@@ -1246,7 +1246,7 @@ int git_reference_is_note(const git_reference *ref)
return
git_reference__is_note
(
ref
->
name
);
}
static
int
peel_error
(
int
error
,
const
git_reference
*
ref
,
const
char
*
msg
)
static
int
peel_error
(
int
error
,
const
git_reference
*
ref
,
const
char
*
msg
)
{
git_error_set
(
GIT_ERROR_INVALID
,
...
...
src/refspec.c
View file @
379c4646
...
...
@@ -359,7 +359,7 @@ int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs)
git_remote_head
key
;
git_refspec
*
cur
;
const
char
*
formatters
[]
=
{
const
char
*
formatters
[]
=
{
GIT_REFS_DIR
"%s"
,
GIT_REFS_TAGS_DIR
"%s"
,
GIT_REFS_HEADS_DIR
"%s"
,
...
...
src/remote.c
View file @
379c4646
...
...
@@ -677,7 +677,7 @@ int git_remote_set_instance_pushurl(git_remote *remote, const char *url)
return
0
;
}
int
git_remote_set_pushurl
(
git_repository
*
repo
,
const
char
*
remote
,
const
char
*
url
)
int
git_remote_set_pushurl
(
git_repository
*
repo
,
const
char
*
remote
,
const
char
*
url
)
{
return
set_url
(
repo
,
remote
,
CONFIG_PUSHURL_FMT
,
url
);
}
...
...
src/repository.c
View file @
379c4646
...
...
@@ -2850,8 +2850,8 @@ cleanup:
}
int
git_repository_set_head
(
git_repository
*
repo
,
const
char
*
refname
)
git_repository
*
repo
,
const
char
*
refname
)
{
git_reference
*
ref
=
NULL
,
*
current
=
NULL
,
*
new_head
=
NULL
;
git_buf
log_message
=
GIT_BUF_INIT
;
...
...
@@ -2900,8 +2900,8 @@ cleanup:
}
int
git_repository_set_head_detached
(
git_repository
*
repo
,
const
git_oid
*
commitish
)
git_repository
*
repo
,
const
git_oid
*
commitish
)
{
return
detach
(
repo
,
commitish
,
NULL
);
}
...
...
@@ -2916,7 +2916,7 @@ int git_repository_set_head_detached_from_annotated(
return
detach
(
repo
,
git_annotated_commit_id
(
commitish
),
commitish
->
description
);
}
int
git_repository_detach_head
(
git_repository
*
repo
)
int
git_repository_detach_head
(
git_repository
*
repo
)
{
git_reference
*
old_head
=
NULL
,
*
new_head
=
NULL
,
*
current
=
NULL
;
git_object
*
object
=
NULL
;
...
...
src/reset.c
View file @
379c4646
...
...
@@ -22,7 +22,7 @@
int
git_reset_default
(
git_repository
*
repo
,
const
git_object
*
target
,
const
git_strarray
*
pathspecs
)
const
git_strarray
*
pathspecs
)
{
git_object
*
commit
=
NULL
;
git_tree
*
tree
=
NULL
;
...
...
src/revparse.c
View file @
379c4646
...
...
@@ -14,7 +14,7 @@
#include "git2.h"
static
int
maybe_sha_or_abbrev
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
spec
,
size_t
speclen
)
static
int
maybe_sha_or_abbrev
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
spec
,
size_t
speclen
)
{
git_oid
oid
;
...
...
@@ -24,7 +24,7 @@ static int maybe_sha_or_abbrev(git_object** out, git_repository *repo, const cha
return
git_object_lookup_prefix
(
out
,
repo
,
&
oid
,
speclen
,
GIT_OBJECT_ANY
);
}
static
int
maybe_sha
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
spec
)
static
int
maybe_sha
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
spec
)
{
size_t
speclen
=
strlen
(
spec
);
...
...
@@ -34,7 +34,7 @@ static int maybe_sha(git_object** out, git_repository *repo, const char *spec)
return
maybe_sha_or_abbrev
(
out
,
repo
,
spec
,
speclen
);
}
static
int
maybe_abbrev
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
spec
)
static
int
maybe_abbrev
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
spec
)
{
size_t
speclen
=
strlen
(
spec
);
...
...
@@ -310,7 +310,7 @@ cleanup:
return
error
;
}
static
int
handle_at_syntax
(
git_object
**
out
,
git_reference
**
ref
,
const
char
*
spec
,
size_t
identifier_len
,
git_repository
*
repo
,
const
char
*
curly_braces_content
)
static
int
handle_at_syntax
(
git_object
**
out
,
git_reference
**
ref
,
const
char
*
spec
,
size_t
identifier_len
,
git_repository
*
repo
,
const
char
*
curly_braces_content
)
{
bool
is_numeric
;
int
parsed
=
0
,
error
=
-
1
;
...
...
src/stash.c
View file @
379c4646
...
...
@@ -56,7 +56,7 @@ static int append_abbreviated_oid(git_buf *out, const git_oid *b_commit)
return
git_buf_oom
(
out
)
?
-
1
:
0
;
}
static
int
append_commit_description
(
git_buf
*
out
,
git_commit
*
commit
)
static
int
append_commit_description
(
git_buf
*
out
,
git_commit
*
commit
)
{
const
char
*
summary
=
git_commit_summary
(
commit
);
GIT_ERROR_CHECK_ALLOC
(
summary
);
...
...
src/streams/openssl_legacy.c
View file @
379c4646
...
...
@@ -36,7 +36,7 @@ int OPENSSL_init_ssl__legacy(uint64_t opts, const void *settings)
return
0
;
}
BIO_METHOD
*
BIO_meth_new__legacy
(
int
type
,
const
char
*
name
)
BIO_METHOD
*
BIO_meth_new__legacy
(
int
type
,
const
char
*
name
)
{
BIO_METHOD
*
meth
=
git__calloc
(
1
,
sizeof
(
BIO_METHOD
));
if
(
!
meth
)
{
...
...
src/streams/openssl_legacy.h
View file @
379c4646
...
...
@@ -42,7 +42,7 @@
#if defined(GIT_OPENSSL_LEGACY) || defined(GIT_OPENSSL_DYNAMIC)
extern
int
OPENSSL_init_ssl__legacy
(
uint64_t
opts
,
const
void
*
settings
);
extern
BIO_METHOD
*
BIO_meth_new__legacy
(
int
type
,
const
char
*
name
);
extern
BIO_METHOD
*
BIO_meth_new__legacy
(
int
type
,
const
char
*
name
);
extern
void
BIO_meth_free__legacy
(
BIO_METHOD
*
biom
);
extern
int
BIO_meth_set_write__legacy
(
BIO_METHOD
*
biom
,
int
(
*
write
)
(
BIO
*
,
const
char
*
,
int
));
extern
int
BIO_meth_set_read__legacy
(
BIO_METHOD
*
biom
,
int
(
*
read
)
(
BIO
*
,
char
*
,
int
));
...
...
src/trailer.c
View file @
379c4646
...
...
@@ -258,7 +258,7 @@ static size_t find_trailer_end(const char *buf, size_t len)
return
len
-
ignore_non_trailer
(
buf
,
len
);
}
static
char
*
extract_trailer_block
(
const
char
*
message
,
size_t
*
len
)
static
char
*
extract_trailer_block
(
const
char
*
message
,
size_t
*
len
)
{
size_t
patch_start
=
find_patch_start
(
message
);
size_t
trailer_end
=
find_trailer_end
(
message
,
patch_start
);
...
...
src/transports/ssh.c
View file @
379c4646
...
...
@@ -476,11 +476,11 @@ static int request_creds(git_credential **out, ssh_subtransport *t, const char *
}
static
int
_git_ssh_session_create
(
LIBSSH2_SESSION
**
session
,
LIBSSH2_SESSION
**
session
,
git_stream
*
io
)
{
int
rc
=
0
;
LIBSSH2_SESSION
*
s
;
LIBSSH2_SESSION
*
s
;
git_socket_stream
*
socket
=
GIT_CONTAINER_OF
(
io
,
git_socket_stream
,
parent
);
GIT_ASSERT_ARG
(
session
);
...
...
@@ -521,8 +521,8 @@ static int _git_ssh_setup_conn(
size_t
i
;
ssh_stream
*
s
;
git_credential
*
cred
=
NULL
;
LIBSSH2_SESSION
*
session
=
NULL
;
LIBSSH2_CHANNEL
*
channel
=
NULL
;
LIBSSH2_SESSION
*
session
=
NULL
;
LIBSSH2_CHANNEL
*
channel
=
NULL
;
t
->
current_stream
=
NULL
;
...
...
src/transports/winhttp.c
View file @
379c4646
...
...
@@ -250,7 +250,7 @@ static int acquire_fallback_cred(
hCoInitResult
=
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
if
(
SUCCEEDED
(
hCoInitResult
)
||
hCoInitResult
==
RPC_E_CHANGED_MODE
)
{
IInternetSecurityManager
*
pISM
;
IInternetSecurityManager
*
pISM
;
/* And if the target URI is in the My Computer, Intranet, or Trusted zones */
if
(
SUCCEEDED
(
CoCreateInstance
(
&
CLSID_InternetSecurityManager
,
NULL
,
...
...
src/win32/findfile.c
View file @
379c4646
...
...
@@ -49,7 +49,7 @@ static int win32_path_to_8(git_buf *dest, const wchar_t *src)
return
git_buf_sets
(
dest
,
utf8_path
);
}
static
wchar_t
*
win32_walkpath
(
wchar_t
*
path
,
wchar_t
*
buf
,
size_t
buflen
)
static
wchar_t
*
win32_walkpath
(
wchar_t
*
path
,
wchar_t
*
buf
,
size_t
buflen
)
{
wchar_t
term
,
*
base
=
path
;
...
...
src/win32/posix.h
View file @
379c4646
...
...
@@ -23,7 +23,7 @@ typedef SOCKET GIT_SOCKET;
extern
int
p_fstat
(
int
fd
,
struct
stat
*
buf
);
extern
int
p_lstat
(
const
char
*
file_name
,
struct
stat
*
buf
);
extern
int
p_stat
(
const
char
*
path
,
struct
stat
*
buf
);
extern
int
p_stat
(
const
char
*
path
,
struct
stat
*
buf
);
extern
int
p_utimes
(
const
char
*
filename
,
const
struct
p_timeval
times
[
2
]);
extern
int
p_futimes
(
int
fd
,
const
struct
p_timeval
times
[
2
]);
...
...
@@ -38,15 +38,15 @@ extern char *p_realpath(const char *orig_path, char *buffer);
extern
int
p_recv
(
GIT_SOCKET
socket
,
void
*
buffer
,
size_t
length
,
int
flags
);
extern
int
p_send
(
GIT_SOCKET
socket
,
const
void
*
buffer
,
size_t
length
,
int
flags
);
extern
int
p_inet_pton
(
int
af
,
const
char
*
src
,
void
*
dst
);
extern
int
p_inet_pton
(
int
af
,
const
char
*
src
,
void
*
dst
);
extern
int
p_vsnprintf
(
char
*
buffer
,
size_t
count
,
const
char
*
format
,
va_list
argptr
);
extern
int
p_snprintf
(
char
*
buffer
,
size_t
count
,
const
char
*
format
,
...)
GIT_FORMAT_PRINTF
(
3
,
4
);
extern
int
p_mkstemp
(
char
*
tmp_path
);
extern
int
p_chdir
(
const
char
*
path
);
extern
int
p_chmod
(
const
char
*
path
,
mode_t
mode
);
extern
int
p_rmdir
(
const
char
*
path
);
extern
int
p_access
(
const
char
*
path
,
mode_t
mode
);
extern
int
p_chdir
(
const
char
*
path
);
extern
int
p_chmod
(
const
char
*
path
,
mode_t
mode
);
extern
int
p_rmdir
(
const
char
*
path
);
extern
int
p_access
(
const
char
*
path
,
mode_t
mode
);
extern
int
p_ftruncate
(
int
fd
,
off64_t
size
);
/* p_lstat is almost but not quite POSIX correct. Specifically, the use of
...
...
src/win32/posix_w32.c
View file @
379c4646
...
...
@@ -690,7 +690,7 @@ static int getfinalpath_w(
return
(
int
)
git_win32_path_remove_namespace
(
dest
,
dwChars
);
}
static
int
follow_and_lstat_link
(
git_win32_path
path
,
struct
stat
*
buf
)
static
int
follow_and_lstat_link
(
git_win32_path
path
,
struct
stat
*
buf
)
{
git_win32_path
target_w
;
...
...
@@ -716,7 +716,7 @@ int p_fstat(int fd, struct stat *buf)
return
0
;
}
int
p_stat
(
const
char
*
path
,
struct
stat
*
buf
)
int
p_stat
(
const
char
*
path
,
struct
stat
*
buf
)
{
git_win32_path
path_w
;
int
len
;
...
...
@@ -733,7 +733,7 @@ int p_stat(const char* path, struct stat* buf)
return
0
;
}
int
p_chdir
(
const
char
*
path
)
int
p_chdir
(
const
char
*
path
)
{
git_win32_path
buf
;
...
...
@@ -743,7 +743,7 @@ int p_chdir(const char* path)
return
_wchdir
(
buf
);
}
int
p_chmod
(
const
char
*
path
,
mode_t
mode
)
int
p_chmod
(
const
char
*
path
,
mode_t
mode
)
{
git_win32_path
buf
;
...
...
@@ -753,7 +753,7 @@ int p_chmod(const char* path, mode_t mode)
return
_wchmod
(
buf
,
mode
);
}
int
p_rmdir
(
const
char
*
path
)
int
p_rmdir
(
const
char
*
path
)
{
git_win32_path
buf
;
int
error
;
...
...
@@ -873,7 +873,7 @@ int p_mkstemp(char *tmp_path)
return
p_open
(
tmp_path
,
O_RDWR
|
O_CREAT
|
O_EXCL
,
0744
);
/* -V536 */
}
int
p_access
(
const
char
*
path
,
mode_t
mode
)
int
p_access
(
const
char
*
path
,
mode_t
mode
)
{
git_win32_path
buf
;
...
...
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