apply.c: fix whitespace-only mismerge
4af9a7d3
("Merge branch 'bc/object-id'", 2016-09-19) involved merging a lot of changes made to builtin/apply.c on the side branch manually to apply.c as an intervening commit13b5af22
("apply: move libified code from builtin/apply.c to apply.{c,h}", 2016-04-22) moved a lot of the lines changed on the side branch to a different file apply.c at the top-level, requiring manual patching of it. Apparently, the maintainer screwed up and made the code indent in a funny way while doing so. Reported-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
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);
|
state->fake_ancestor);
|
||||||
|
|
||||||
return 0;
|
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;
|
int files, adds, dels;
|
||||||
|
|
||||||
for (files = adds = dels = 0 ; patch ; patch = patch->next) {
|
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);
|
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)
|
struct patch *patch)
|
||||||
{
|
{
|
||||||
for ( ; patch; patch = patch->next) {
|
for ( ; patch; patch = patch->next) {
|
||||||
const char *name;
|
const char *name;
|
||||||
name = patch->new_name ? patch->new_name : patch->old_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);
|
printf("%d\t%d\t", patch->lines_added, patch->lines_deleted);
|
||||||
write_name_quoted(name, stdout, state->line_termination);
|
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)
|
if (mode)
|
||||||
printf(" %s mode %06o %s\n", newdelete, mode, name);
|
printf(" %s mode %06o %s\n", newdelete, mode, name);
|
||||||
else
|
else
|
||||||
printf(" %s %s\n", newdelete, name);
|
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 (p->old_mode && p->new_mode && p->old_mode != p->new_mode) {
|
||||||
if (show_name)
|
if (show_name)
|
||||||
printf(" mode change %06o => %06o %s\n",
|
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",
|
printf(" mode change %06o => %06o\n",
|
||||||
p->old_mode, p->new_mode);
|
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 *renamecopy = p->is_rename ? "rename" : "copy";
|
||||||
const char *old, *new;
|
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,
|
printf(" %s %s => %s (%d%%)\n", renamecopy,
|
||||||
p->old_name, p->new_name, p->score);
|
p->old_name, p->new_name, p->score);
|
||||||
show_mode_change(p, 0);
|
show_mode_change(p, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void summary_patch_list(struct patch *patch)
|
static void summary_patch_list(struct patch *patch)
|
||||||
{
|
{
|
||||||
struct patch *p;
|
struct patch *p;
|
||||||
|
|
||||||
for (p = patch; p; p = p->next) {
|
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;
|
int lines = patch->lines_added + patch->lines_deleted;
|
||||||
|
|
||||||
if (lines > state->max_change)
|
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)
|
if (len > state->max_len)
|
||||||
state->max_len = 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 (state->update_index) {
|
||||||
if (remove_file_from_cache(patch->old_name) < 0)
|
if (remove_file_from_cache(patch->old_name) < 0)
|
||||||
return error(_("unable to remove %s from index"), patch->old_name);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int add_index_file(struct apply_state *state,
|
static int add_index_file(struct apply_state *state,
|
||||||
const char *path,
|
const char *path,
|
||||||
unsigned mode,
|
unsigned mode,
|
||||||
void *buf,
|
void *buf,
|
||||||
unsigned long size)
|
unsigned long size)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
struct cache_entry *ce;
|
struct cache_entry *ce;
|
||||||
int namelen = strlen(path);
|
int namelen = strlen(path);
|
||||||
|
Reference in New Issue
Block a user