Merge branch 'ep/varscope'
Shrink lifetime of variables by moving their definitions to an inner scope where appropriate. * ep/varscope: builtin/gc.c: reduce scope of variables builtin/fetch.c: reduce scope of variable builtin/commit.c: reduce scope of variables builtin/clean.c: reduce scope of variable builtin/blame.c: reduce scope of variables builtin/apply.c: reduce scope of variables bisect.c: reduce scope of variable
This commit is contained in:
@ -1943,13 +1943,7 @@ static int parse_chunk(char *buffer, unsigned long size, struct patch *patch)
|
||||
size - offset - hdrsize, patch);
|
||||
|
||||
if (!patchsize) {
|
||||
static const char *binhdr[] = {
|
||||
"Binary files ",
|
||||
"Files ",
|
||||
NULL,
|
||||
};
|
||||
static const char git_binary[] = "GIT binary patch\n";
|
||||
int i;
|
||||
int hd = hdrsize + offset;
|
||||
unsigned long llen = linelen(buffer + hd, size - hd);
|
||||
|
||||
@ -1965,6 +1959,12 @@ static int parse_chunk(char *buffer, unsigned long size, struct patch *patch)
|
||||
patchsize = 0;
|
||||
}
|
||||
else if (!memcmp(" differ\n", buffer + hd + llen - 8, 8)) {
|
||||
static const char *binhdr[] = {
|
||||
"Binary files ",
|
||||
"Files ",
|
||||
NULL,
|
||||
};
|
||||
int i;
|
||||
for (i = 0; binhdr[i]; i++) {
|
||||
int len = strlen(binhdr[i]);
|
||||
if (len < size - hd &&
|
||||
|
Reference in New Issue
Block a user