mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-22 22:20:02 +00:00
commit
c148533024
@ -1360,9 +1360,11 @@ fail:
|
||||
|
||||
static bool should_remove_existing(checkout_data *data)
|
||||
{
|
||||
int ignorecase = 0;
|
||||
int ignorecase;
|
||||
|
||||
git_repository__cvar(&ignorecase, data->repo, GIT_CVAR_IGNORECASE);
|
||||
if (git_repository__cvar(&ignorecase, data->repo, GIT_CVAR_IGNORECASE) < 0) {
|
||||
ignorecase = 0;
|
||||
}
|
||||
|
||||
return (ignorecase &&
|
||||
(data->strategy & GIT_CHECKOUT_DONT_REMOVE_EXISTING) == 0);
|
||||
|
@ -121,13 +121,13 @@ int git__delta_apply(
|
||||
size_t off = 0, len = 0;
|
||||
|
||||
if (cmd & 0x01) off = *delta++;
|
||||
if (cmd & 0x02) off |= *delta++ << 8;
|
||||
if (cmd & 0x04) off |= *delta++ << 16;
|
||||
if (cmd & 0x08) off |= *delta++ << 24;
|
||||
if (cmd & 0x02) off |= *delta++ << 8UL;
|
||||
if (cmd & 0x04) off |= *delta++ << 16UL;
|
||||
if (cmd & 0x08) off |= *delta++ << 24UL;
|
||||
|
||||
if (cmd & 0x10) len = *delta++;
|
||||
if (cmd & 0x20) len |= *delta++ << 8;
|
||||
if (cmd & 0x40) len |= *delta++ << 16;
|
||||
if (cmd & 0x20) len |= *delta++ << 8UL;
|
||||
if (cmd & 0x40) len |= *delta++ << 16UL;
|
||||
if (!len) len = 0x10000;
|
||||
|
||||
if (base_len < off + len || res_sz < len)
|
||||
|
14
src/diff.c
14
src/diff.c
@ -1083,17 +1083,13 @@ static int handle_unmatched_new_item(
|
||||
if (recurse_into_dir) {
|
||||
error = iterator_advance_into(&info->nitem, info->new_iter);
|
||||
|
||||
/* if real error or no error, proceed with iteration */
|
||||
if (error != GIT_ENOTFOUND)
|
||||
return error;
|
||||
/* if directory is empty, can't advance into it, so skip it */
|
||||
if (error == GIT_ENOTFOUND) {
|
||||
giterr_clear();
|
||||
error = iterator_advance(&info->nitem, info->new_iter);
|
||||
}
|
||||
|
||||
/* if directory is empty, can't advance into it, so either skip
|
||||
* it or ignore it
|
||||
*/
|
||||
if (error == GIT_ENOTFOUND || contains_oitem)
|
||||
return iterator_advance(&info->nitem, info->new_iter);
|
||||
delta_type = GIT_DELTA_IGNORED;
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3008,7 +3008,7 @@ int git_index_read_index(
|
||||
|
||||
if (error < 0) {
|
||||
giterr_set(GITERR_INDEX, "failed to insert entry");
|
||||
return error;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (diff <= 0) {
|
||||
|
@ -134,8 +134,8 @@ static int merge_file__xdiff(
|
||||
|
||||
path = git_merge_file__best_path(
|
||||
ancestor ? ancestor->path : NULL,
|
||||
ours ? ours->path : NULL,
|
||||
theirs ? theirs->path : NULL);
|
||||
ours->path,
|
||||
theirs->path);
|
||||
|
||||
if (path != NULL && (out->path = git__strdup(path)) == NULL) {
|
||||
error = -1;
|
||||
@ -147,8 +147,8 @@ static int merge_file__xdiff(
|
||||
out->len = mmbuffer.size;
|
||||
out->mode = git_merge_file__best_mode(
|
||||
ancestor ? ancestor->mode : 0,
|
||||
ours ? ours->mode : 0,
|
||||
theirs ? theirs->mode : 0);
|
||||
ours->mode,
|
||||
theirs->mode);
|
||||
|
||||
done:
|
||||
if (error < 0)
|
||||
|
@ -91,7 +91,7 @@ static int object_mkdir(const git_buf *name, const loose_backend *be)
|
||||
|
||||
static size_t get_binary_object_header(obj_hdr *hdr, git_buf *obj)
|
||||
{
|
||||
unsigned char c;
|
||||
unsigned long c;
|
||||
unsigned char *data = (unsigned char *)obj->ptr;
|
||||
size_t shift, size, used = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user