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
d1bdf2a8
Unverified
Commit
d1bdf2a8
authored
Dec 14, 2023
by
Edward Thomson
Committed by
GitHub
Dec 14, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6678 from libgit2/ethomson/compat_fixes
Several compatibility fixes
parents
82d44145
839b2495
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
36 additions
and
21 deletions
+36
-21
deps/ntlmclient/crypt_commoncrypto.c
+2
-1
include/git2/sys/stream.h
+2
-2
src/cli/opt.c
+1
-1
src/cli/opt.h
+13
-3
src/libgit2/config_parse.c
+5
-5
src/libgit2/refdb_fs.c
+2
-2
src/libgit2/transports/smart.h
+1
-1
src/util/net.c
+1
-1
src/util/process.h
+4
-4
tests/clar/clar.c
+2
-0
tests/clar/clar/fixtures.h
+1
-1
tests/clar/clar/fs.h
+2
-0
No files found.
deps/ntlmclient/crypt_commoncrypto.c
View file @
d1bdf2a8
...
...
@@ -59,11 +59,12 @@ bool ntlm_des_encrypt(
ntlm_des_block
*
plaintext
,
ntlm_des_block
*
key
)
{
CCCryptorStatus
result
;
size_t
written
;
NTLM_UNUSED
(
ntlm
);
CCCryptorStatus
result
=
CCCrypt
(
kCCEncrypt
,
result
=
CCCrypt
(
kCCEncrypt
,
kCCAlgorithmDES
,
kCCOptionECBMode
,
key
,
sizeof
(
ntlm_des_block
),
NULL
,
plaintext
,
sizeof
(
ntlm_des_block
),
...
...
include/git2/sys/stream.h
View file @
d1bdf2a8
...
...
@@ -29,8 +29,8 @@ GIT_BEGIN_DECL
typedef
struct
git_stream
{
int
version
;
int
encrypted
:
1
,
proxy_support
:
1
;
unsigned
int
encrypted
:
1
,
proxy_support
:
1
;
/**
* Timeout for read and write operations; can be set to `0` to
...
...
src/cli/opt.c
View file @
d1bdf2a8
...
...
@@ -10,7 +10,7 @@
* This file was produced by using the `rename.pl` script included with
* adopt. The command-line specified was:
*
* ./rename.pl cli_opt --filename=opt --include=c
li
.h --inline=GIT_INLINE --header-guard=CLI_opt_h__ --lowercase-status --without-usage
* ./rename.pl cli_opt --filename=opt --include=c
ommon
.h --inline=GIT_INLINE --header-guard=CLI_opt_h__ --lowercase-status --without-usage
*/
#include <stdlib.h>
...
...
src/cli/opt.h
View file @
d1bdf2a8
...
...
@@ -10,7 +10,7 @@
* This file was produced by using the `rename.pl` script included with
* adopt. The command-line specified was:
*
* ./rename.pl cli_opt --filename=opt --include=c
li
.h --inline=GIT_INLINE --header-guard=CLI_opt_h__ --lowercase-status --without-usage
* ./rename.pl cli_opt --filename=opt --include=c
ommon
.h --inline=GIT_INLINE --header-guard=CLI_opt_h__ --lowercase-status --without-usage
*/
#ifndef CLI_opt_h__
...
...
@@ -275,8 +275,8 @@ typedef struct cli_opt_parser {
size_t
arg_idx
;
size_t
in_args
;
size_t
in_short
;
int
needs_sort
:
1
,
in_literal
:
1
;
unsigned
int
needs_sort
:
1
,
in_literal
:
1
;
}
cli_opt_parser
;
/**
...
...
@@ -300,6 +300,16 @@ cli_opt_status_t cli_opt_parse(
size_t
args_len
,
unsigned
int
flags
);
/**
* Quickly executes the given callback for each argument.
*
* @param specs A NULL-terminated array of `cli_opt_spec`s that can be parsed
* @param args The arguments that will be parsed
* @param args_len The length of arguments to be parsed
* @param flags The `cli_opt_flag_t flags for parsing
* @param callback The callback to invoke for each specified option
* @param callback_data Data to be provided to the callback
*/
int
cli_opt_foreach
(
const
cli_opt_spec
specs
[],
char
**
args
,
...
...
src/libgit2/config_parse.c
View file @
d1bdf2a8
...
...
@@ -279,8 +279,7 @@ static int skip_bom(git_parse_ctx *parser)
*/
/* '\"' -> '"' etc */
static
int
unescape_line
(
char
**
out
,
bool
*
is_multi
,
const
char
*
ptr
,
int
quote_count
)
static
int
unescape_line
(
char
**
out
,
bool
*
is_multi
,
const
char
*
ptr
,
int
*
quote_count
)
{
char
*
str
,
*
fixed
,
*
esc
;
size_t
ptr_len
=
strlen
(
ptr
),
alloc_len
;
...
...
@@ -296,7 +295,8 @@ static int unescape_line(
while
(
*
ptr
!=
'\0'
)
{
if
(
*
ptr
==
'"'
)
{
quote_count
++
;
if
(
quote_count
)
(
*
quote_count
)
++
;
}
else
if
(
*
ptr
!=
'\\'
)
{
*
fixed
++
=
*
ptr
;
}
else
{
...
...
@@ -358,7 +358,7 @@ static int parse_multiline_variable(git_config_parser *reader, git_str *value, i
goto
next
;
if
((
error
=
unescape_line
(
&
proc_line
,
&
multiline
,
line
,
in_quotes
))
<
0
)
line
,
&
in_quotes
))
<
0
)
goto
out
;
/* Add this line to the multiline var */
...
...
@@ -445,7 +445,7 @@ static int parse_variable(git_config_parser *reader, char **var_name, char **var
while
(
git__isspace
(
value_start
[
0
]))
value_start
++
;
if
((
error
=
unescape_line
(
&
value
,
&
multiline
,
value_start
,
0
))
<
0
)
if
((
error
=
unescape_line
(
&
value
,
&
multiline
,
value_start
,
NULL
))
<
0
)
goto
out
;
if
(
multiline
)
{
...
...
src/libgit2/refdb_fs.c
View file @
d1bdf2a8
...
...
@@ -62,8 +62,8 @@ typedef struct refdb_fs_backend {
git_oid_t
oid_type
;
int
fsync
:
1
,
sorted
:
1
;
unsigned
int
fsync
:
1
,
sorted
:
1
;
int
peeling_mode
;
git_iterator_flag_t
iterator_flags
;
uint32_t
direach_flags
;
...
...
src/libgit2/transports/smart.h
View file @
d1bdf2a8
...
...
@@ -203,7 +203,7 @@ int git_smart__update_heads(transport_smart *t, git_vector *symrefs);
/* smart_pkt.c */
typedef
struct
{
git_oid_t
oid_type
;
int
seen_capabilities
:
1
;
unsigned
int
seen_capabilities
:
1
;
}
git_pkt_parse_data
;
int
git_pkt_parse_line
(
git_pkt
**
head
,
const
char
**
endptr
,
const
char
*
line
,
size_t
linelen
,
git_pkt_parse_data
*
data
);
...
...
src/util/net.c
View file @
d1bdf2a8
...
...
@@ -22,7 +22,7 @@
#define GIT_NET_URL_PARSER_INIT { 0 }
typedef
struct
{
int
hierarchical
:
1
;
unsigned
int
hierarchical
:
1
;
const
char
*
scheme
;
const
char
*
user
;
...
...
src/util/process.h
View file @
d1bdf2a8
...
...
@@ -11,10 +11,10 @@
typedef
struct
git_process
git_process
;
typedef
struct
{
int
capture_in
:
1
,
capture_out
:
1
,
capture_err
:
1
,
exclude_env
:
1
;
unsigned
int
capture_in
:
1
,
capture_out
:
1
,
capture_err
:
1
,
exclude_env
:
1
;
char
*
cwd
;
}
git_process_options
;
...
...
tests/clar/clar.c
View file @
d1bdf2a8
...
...
@@ -94,8 +94,10 @@
static
void
fs_rm
(
const
char
*
_source
);
static
void
fs_copy
(
const
char
*
_source
,
const
char
*
dest
);
#ifdef CLAR_FIXTURE_PATH
static
const
char
*
fixture_path
(
const
char
*
base
,
const
char
*
fixture_name
);
#endif
struct
clar_error
{
const
char
*
file
;
...
...
tests/clar/clar/fixtures.h
View file @
d1bdf2a8
#ifdef CLAR_FIXTURE_PATH
static
const
char
*
fixture_path
(
const
char
*
base
,
const
char
*
fixture_name
)
{
...
...
@@ -20,7 +21,6 @@ fixture_path(const char *base, const char *fixture_name)
return
_path
;
}
#ifdef CLAR_FIXTURE_PATH
const
char
*
cl_fixture
(
const
char
*
fixture_name
)
{
return
fixture_path
(
CLAR_FIXTURE_PATH
,
fixture_name
);
...
...
tests/clar/clar/fs.h
View file @
d1bdf2a8
...
...
@@ -295,7 +295,9 @@ fs_copy(const char *_source, const char *_dest)
void
cl_fs_cleanup
(
void
)
{
#ifdef CLAR_FIXTURE_PATH
fs_rm
(
fixture_path
(
_clar_path
,
"*"
));
#endif
}
#else
...
...
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