projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcbfd5a
)
git-apply: creatign empty files is nonfatal
author
Linus Torvalds
<torvalds@ppc970.osdl.org>
Wed, 8 Jun 2005 15:11:47 +0000
(08:11 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Wed, 8 Jun 2005 15:11:47 +0000
(08:11 -0700)
(but it will result in a warning)
apply.c
patch
|
blob
|
history
diff --git
a/apply.c
b/apply.c
index
1f48ef9
..
20c41c5
100644
(file)
--- a/
apply.c
+++ b/
apply.c
@@
-630,8
+630,11
@@
static int parse_fragment(char *line, unsigned long size, struct patch *patch, s
if (patch->is_new != !oldlines)
return error("new file depends on old contents");
- if (patch->is_delete != !newlines)
- return error("deleted file still has contents");
+ if (patch->is_delete != !newlines) {
+ if (newlines)
+ return error("deleted file still has contents");
+ fprintf(stderr, "** warning: file %s becomes empty but is not deleted\n", patch->new_name);
+ }
/* Parse the thing.. */
line += len;