projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5041aa7
)
git-apply: when validating default names, check the final EOLN too
author
Linus Torvalds
<torvalds@ppc970.osdl.org>
Thu, 26 May 2005 20:28:42 +0000
(13:28 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Thu, 26 May 2005 20:28:42 +0000
(13:28 -0700)
This means that filenames are totally unambiguous even if they
have spaces or tabs in them.
apply.c
patch
|
blob
|
history
diff --git
a/apply.c
b/apply.c
index
3606419
..
2fab347
100644
(file)
--- a/
apply.c
+++ b/
apply.c
@@
-381,7
+381,7
@@
static char *git_header_name(char *line)
if (c == '/')
break;
}
- if (!memcmp(name, second, len)) {
+ if (
second[len] == '\n' &&
!memcmp(name, second, len)) {
char *ret = xmalloc(len + 1);
memcpy(ret, name, len);
ret[len] = 0;