Merge branch 'jc/apply-fix-mismerge'
* jc/apply-fix-mismerge: apply.c: fix whitespace-only mismerge
This commit is contained in:
commit
afc5f2ce63
54
apply.c
54
apply.c
@ -4096,10 +4096,10 @@ static int build_fake_ancestor(struct apply_state *state, struct patch *list)
|
||||
state->fake_ancestor);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void stat_patch_list(struct apply_state *state, struct patch *patch)
|
||||
{
|
||||
static void stat_patch_list(struct apply_state *state, struct patch *patch)
|
||||
{
|
||||
int files, adds, dels;
|
||||
|
||||
for (files = adds = dels = 0 ; patch ; patch = patch->next) {
|
||||
@ -4110,11 +4110,11 @@ static int build_fake_ancestor(struct apply_state *state, struct patch *list)
|
||||
}
|
||||
|
||||
print_stat_summary(stdout, files, adds, dels);
|
||||
}
|
||||
}
|
||||
|
||||
static void numstat_patch_list(struct apply_state *state,
|
||||
static void numstat_patch_list(struct apply_state *state,
|
||||
struct patch *patch)
|
||||
{
|
||||
{
|
||||
for ( ; patch; patch = patch->next) {
|
||||
const char *name;
|
||||
name = patch->new_name ? patch->new_name : patch->old_name;
|
||||
@ -4124,18 +4124,18 @@ static int build_fake_ancestor(struct apply_state *state, struct patch *list)
|
||||
printf("%d\t%d\t", patch->lines_added, patch->lines_deleted);
|
||||
write_name_quoted(name, stdout, state->line_termination);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void show_file_mode_name(const char *newdelete, unsigned int mode, const char *name)
|
||||
{
|
||||
static void show_file_mode_name(const char *newdelete, unsigned int mode, const char *name)
|
||||
{
|
||||
if (mode)
|
||||
printf(" %s mode %06o %s\n", newdelete, mode, name);
|
||||
else
|
||||
printf(" %s %s\n", newdelete, name);
|
||||
}
|
||||
}
|
||||
|
||||
static void show_mode_change(struct patch *p, int show_name)
|
||||
{
|
||||
static void show_mode_change(struct patch *p, int show_name)
|
||||
{
|
||||
if (p->old_mode && p->new_mode && p->old_mode != p->new_mode) {
|
||||
if (show_name)
|
||||
printf(" mode change %06o => %06o %s\n",
|
||||
@ -4144,10 +4144,10 @@ static int build_fake_ancestor(struct apply_state *state, struct patch *list)
|
||||
printf(" mode change %06o => %06o\n",
|
||||
p->old_mode, p->new_mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void show_rename_copy(struct patch *p)
|
||||
{
|
||||
static void show_rename_copy(struct patch *p)
|
||||
{
|
||||
const char *renamecopy = p->is_rename ? "rename" : "copy";
|
||||
const char *old, *new;
|
||||
|
||||
@ -4177,10 +4177,10 @@ static int build_fake_ancestor(struct apply_state *state, struct patch *list)
|
||||
printf(" %s %s => %s (%d%%)\n", renamecopy,
|
||||
p->old_name, p->new_name, p->score);
|
||||
show_mode_change(p, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void summary_patch_list(struct patch *patch)
|
||||
{
|
||||
static void summary_patch_list(struct patch *patch)
|
||||
{
|
||||
struct patch *p;
|
||||
|
||||
for (p = patch; p; p = p->next) {
|
||||
@ -4202,10 +4202,10 @@ static int build_fake_ancestor(struct apply_state *state, struct patch *list)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void patch_stats(struct apply_state *state, struct patch *patch)
|
||||
{
|
||||
static void patch_stats(struct apply_state *state, struct patch *patch)
|
||||
{
|
||||
int lines = patch->lines_added + patch->lines_deleted;
|
||||
|
||||
if (lines > state->max_change)
|
||||
@ -4224,10 +4224,10 @@ static int build_fake_ancestor(struct apply_state *state, struct patch *list)
|
||||
if (len > state->max_len)
|
||||
state->max_len = len;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int remove_file(struct apply_state *state, struct patch *patch, int rmdir_empty)
|
||||
{
|
||||
static int remove_file(struct apply_state *state, struct patch *patch, int rmdir_empty)
|
||||
{
|
||||
if (state->update_index) {
|
||||
if (remove_file_from_cache(patch->old_name) < 0)
|
||||
return error(_("unable to remove %s from index"), patch->old_name);
|
||||
@ -4238,14 +4238,14 @@ static int build_fake_ancestor(struct apply_state *state, struct patch *list)
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int add_index_file(struct apply_state *state,
|
||||
static int add_index_file(struct apply_state *state,
|
||||
const char *path,
|
||||
unsigned mode,
|
||||
void *buf,
|
||||
unsigned long size)
|
||||
{
|
||||
{
|
||||
struct stat st;
|
||||
struct cache_entry *ce;
|
||||
int namelen = strlen(path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user