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
f861abad
Commit
f861abad
authored
Jul 12, 2015
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'portable-zu'
parents
a522d8c1
768f8be3
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
20 additions
and
20 deletions
+20
-20
examples/network/fetch.c
+2
-2
src/cache.c
+4
-4
src/checkout.c
+2
-2
src/merge.c
+3
-3
src/rebase.c
+2
-2
src/stash.c
+1
-1
src/transports/http.c
+1
-1
src/transports/smart_pkt.c
+1
-1
tests/blame/blame_helpers.c
+1
-1
tests/clar_libgit2.c
+2
-2
tests/merge/merge_helpers.c
+1
-1
No files found.
examples/network/fetch.c
View file @
f861abad
...
...
@@ -143,10 +143,10 @@ int fetch(git_repository *repo, int argc, char **argv)
* network.
*/
if
(
stats
->
local_objects
>
0
)
{
printf
(
"
\r
Received %d/%d objects in %
zu
bytes (used %d local objects)
\n
"
,
printf
(
"
\r
Received %d/%d objects in %
"
PRIuZ
"
bytes (used %d local objects)
\n
"
,
stats
->
indexed_objects
,
stats
->
total_objects
,
stats
->
received_bytes
,
stats
->
local_objects
);
}
else
{
printf
(
"
\r
Received %d/%d objects in %
zu
bytes
\n
"
,
printf
(
"
\r
Received %d/%d objects in %
"
PRIuZ
"
bytes
\n
"
,
stats
->
indexed_objects
,
stats
->
total_objects
,
stats
->
received_bytes
);
}
...
...
src/cache.c
View file @
f861abad
...
...
@@ -50,16 +50,16 @@ void git_cache_dump_stats(git_cache *cache)
if
(
kh_size
(
cache
->
map
)
==
0
)
return
;
printf
(
"Cache %p: %d items cached, %
d
bytes
\n
"
,
cache
,
kh_size
(
cache
->
map
),
(
int
)
cache
->
used_memory
);
printf
(
"Cache %p: %d items cached, %
"
PRIdZ
"
bytes
\n
"
,
cache
,
kh_size
(
cache
->
map
),
cache
->
used_memory
);
kh_foreach_value
(
cache
->
map
,
object
,
{
char
oid_str
[
9
];
printf
(
" %s%c %s (%
d
)
\n
"
,
printf
(
" %s%c %s (%
"
PRIuZ
"
)
\n
"
,
git_object_type2string
(
object
->
type
),
object
->
flags
==
GIT_CACHE_STORE_PARSED
?
'*'
:
' '
,
git_oid_tostr
(
oid_str
,
sizeof
(
oid_str
),
&
object
->
oid
),
(
int
)
object
->
size
object
->
size
);
});
}
...
...
src/checkout.c
View file @
f861abad
...
...
@@ -1299,8 +1299,8 @@ static int checkout_get_actions(
if
(
counts
[
CHECKOUT_ACTION__CONFLICT
]
>
0
&&
(
data
->
strategy
&
GIT_CHECKOUT_ALLOW_CONFLICTS
)
==
0
)
{
giterr_set
(
GITERR_CHECKOUT
,
"%
d
%s checkout"
,
(
int
)
counts
[
CHECKOUT_ACTION__CONFLICT
],
giterr_set
(
GITERR_CHECKOUT
,
"%
"
PRIuZ
"
%s checkout"
,
counts
[
CHECKOUT_ACTION__CONFLICT
],
counts
[
CHECKOUT_ACTION__CONFLICT
]
==
1
?
"conflict prevents"
:
"conflicts prevent"
);
error
=
GIT_ECONFLICT
;
...
...
src/merge.c
View file @
f861abad
...
...
@@ -79,7 +79,7 @@ int merge_bases_many(git_commit_list **out, git_revwalk **walk_out, git_reposito
unsigned
int
i
;
if
(
length
<
2
)
{
giterr_set
(
GITERR_INVALID
,
"At least two commits are required to find an ancestor. Provided 'length' was %
u
."
,
length
);
giterr_set
(
GITERR_INVALID
,
"At least two commits are required to find an ancestor. Provided 'length' was %
"
PRIuZ
"
."
,
length
);
return
-
1
;
}
...
...
@@ -185,7 +185,7 @@ int git_merge_base_octopus(git_oid *out, git_repository *repo, size_t length, co
assert
(
out
&&
repo
&&
input_array
);
if
(
length
<
2
)
{
giterr_set
(
GITERR_INVALID
,
"At least two commits are required to find an ancestor. Provided 'length' was %
u
."
,
length
);
giterr_set
(
GITERR_INVALID
,
"At least two commits are required to find an ancestor. Provided 'length' was %
"
PRIuZ
"
."
,
length
);
return
-
1
;
}
...
...
@@ -2451,7 +2451,7 @@ int git_merge__check_result(git_repository *repo, git_index *index_new)
goto
done
;
if
((
conflicts
=
index_conflicts
+
wd_conflicts
)
>
0
)
{
giterr_set
(
GITERR_MERGE
,
"%
d
uncommitted change%s would be overwritten by merge"
,
giterr_set
(
GITERR_MERGE
,
"%
"
PRIuZ
"
uncommitted change%s would be overwritten by merge"
,
conflicts
,
(
conflicts
!=
1
)
?
"s"
:
""
);
error
=
GIT_ECONFLICT
;
}
...
...
src/rebase.c
View file @
f861abad
...
...
@@ -436,7 +436,7 @@ static int rebase_setupfiles_merge(git_rebase *rebase)
size_t
i
;
int
error
=
0
;
if
((
error
=
rebase_setupfile
(
rebase
,
END_FILE
,
-
1
,
"%
d
\n
"
,
git_array_size
(
rebase
->
operations
)))
<
0
||
if
((
error
=
rebase_setupfile
(
rebase
,
END_FILE
,
-
1
,
"%
"
PRIuZ
"
\n
"
,
git_array_size
(
rebase
->
operations
)))
<
0
||
(
error
=
rebase_setupfile
(
rebase
,
ONTO_NAME_FILE
,
-
1
,
"%s
\n
"
,
rebase
->
onto_name
))
<
0
)
goto
done
;
...
...
@@ -789,7 +789,7 @@ static int rebase_next_merge(
normalize_checkout_options_for_apply
(
&
checkout_opts
,
rebase
,
current_commit
);
if
((
error
=
git_indexwriter_init_for_operation
(
&
indexwriter
,
rebase
->
repo
,
&
checkout_opts
.
checkout_strategy
))
<
0
||
(
error
=
rebase_setupfile
(
rebase
,
MSGNUM_FILE
,
-
1
,
"%
d
\n
"
,
rebase
->
current
+
1
))
<
0
||
(
error
=
rebase_setupfile
(
rebase
,
MSGNUM_FILE
,
-
1
,
"%
"
PRIuZ
"
\n
"
,
rebase
->
current
+
1
))
<
0
||
(
error
=
rebase_setupfile
(
rebase
,
CURRENT_FILE
,
-
1
,
"%.*s
\n
"
,
GIT_OID_HEXSZ
,
current_idstr
))
<
0
||
(
error
=
git_merge_trees
(
&
index
,
rebase
->
repo
,
parent_tree
,
head_tree
,
current_tree
,
NULL
))
<
0
||
(
error
=
git_merge__check_result
(
rebase
->
repo
,
index
))
<
0
||
...
...
src/stash.c
View file @
f861abad
...
...
@@ -770,7 +770,7 @@ static int ensure_clean_index(git_repository *repo, git_index *index)
goto
done
;
if
(
git_diff_num_deltas
(
index_diff
)
>
0
)
{
giterr_set
(
GITERR_STASH
,
"%
d
uncommitted changes exist in the index"
,
giterr_set
(
GITERR_STASH
,
"%
"
PRIuZ
"
uncommitted changes exist in the index"
,
git_diff_num_deltas
(
index_diff
));
error
=
GIT_EUNCOMMITTED
;
}
...
...
src/transports/http.c
View file @
f861abad
...
...
@@ -511,7 +511,7 @@ static int write_chunk(git_stream *io, const char *buffer, size_t len)
git_buf
buf
=
GIT_BUF_INIT
;
/* Chunk header */
git_buf_printf
(
&
buf
,
"%
X
\r\n
"
,
(
unsigned
)
len
);
git_buf_printf
(
&
buf
,
"%
"
PRIxZ
"
\r\n
"
,
len
);
if
(
git_buf_oom
(
&
buf
))
return
-
1
;
...
...
src/transports/smart_pkt.c
View file @
f861abad
...
...
@@ -523,7 +523,7 @@ static int buffer_want_with_caps(const git_remote_head *head, transport_smart_ca
if
(
len
>
0xffff
)
{
giterr_set
(
GITERR_NET
,
"Tried to produce packet with invalid length %
d"
,
len
);
"Tried to produce packet with invalid length %
"
PRIuZ
,
len
);
return
-
1
;
}
...
...
tests/blame/blame_helpers.c
View file @
f861abad
...
...
@@ -4,7 +4,7 @@ void hunk_message(size_t idx, const git_blame_hunk *hunk, const char *fmt, ...)
{
va_list
arglist
;
printf
(
"Hunk %
zd
(line %d +%d): "
,
idx
,
printf
(
"Hunk %
"
PRIuZ
"
(line %d +%d): "
,
idx
,
hunk
->
final_start_line_number
,
hunk
->
lines_in_hunk
-
1
);
va_start
(
arglist
,
fmt
);
...
...
tests/clar_libgit2.c
View file @
f861abad
...
...
@@ -486,8 +486,8 @@ void clar__assert_equal_file(
for
(
pos
=
0
;
pos
<
bytes
&&
expected_data
[
pos
]
==
buf
[
pos
];
++
pos
)
/* find differing byte offset */
;
p_snprintf
(
buf
,
sizeof
(
buf
),
"file content mismatch at byte %
d"
,
(
in
t
)(
total_bytes
+
pos
));
buf
,
sizeof
(
buf
),
"file content mismatch at byte %
"
PRIdZ
,
(
ssize_
t
)(
total_bytes
+
pos
));
p_close
(
fd
);
clar__fail
(
file
,
line
,
path
,
buf
,
1
);
}
...
...
tests/merge/merge_helpers.c
View file @
f861abad
...
...
@@ -110,7 +110,7 @@ void merge__dump_index_entries(git_vector *index_entries)
size_t
i
;
const
git_index_entry
*
index_entry
;
printf
(
"
\n
INDEX [%
d]:
\n
"
,
(
int
)
index_entries
->
length
);
printf
(
"
\n
INDEX [%
"
PRIuZ
"]:
\n
"
,
index_entries
->
length
);
for
(
i
=
0
;
i
<
index_entries
->
length
;
i
++
)
{
index_entry
=
index_entries
->
contents
[
i
];
...
...
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