Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/apply.c: reduce scope of variables
author
Elia Pinto
<gitter.spiros@gmail.com>
Wed, 29 Jan 2014 13:30:27 +0000
(
05:30
-0800)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 31 Jan 2014 18:44:04 +0000
(10:44 -0800)
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/apply.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
4824d1b
)
diff --git
a/builtin/apply.c
b/builtin/apply.c
index ef32e4f62415956aa8e2366589d4cd6200d3bf37..154c63fcbbaafb25bfb9cc06f4a4aa21d7982152 100644
(file)
--- a/
builtin/apply.c
+++ b/
builtin/apply.c
@@
-1943,13
+1943,7
@@
static int parse_chunk(char *buffer, unsigned long size, struct patch *patch)
size - offset - hdrsize, patch);
if (!patchsize) {
size - offset - hdrsize, patch);
if (!patchsize) {
- static const char *binhdr[] = {
- "Binary files ",
- "Files ",
- NULL,
- };
static const char git_binary[] = "GIT binary patch\n";
static const char git_binary[] = "GIT binary patch\n";
- int i;
int hd = hdrsize + offset;
unsigned long llen = linelen(buffer + hd, size - hd);
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)) {
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 &&
for (i = 0; binhdr[i]; i++) {
int len = strlen(binhdr[i]);
if (len < size - hd &&