On 05/10/2013 10:03 AM, Peter Zijlstra wrote: > On Fri, May 10, 2013 at 09:23:33AM -0400, Sasha Levin wrote: >> Wait, I'm confused. Over here, patch is fine with creating empty files: >> >> lappy lockdep # touch test.c >> lappy lockdep # git diff /dev/null test.c > test.patch >> lappy lockdep # rm test.c >> lappy lockdep # file test.c >> test.c: ERROR: cannot open `test.c' (No such file or directory) >> lappy lockdep # patch -i test.patch >> patching file test.c >> lappy lockdep # file test.c >> test.c: empty >> lappy lockdep # cat test.patch >> diff --git a/tools/lib/lockdep/test.c b/tools/lib/lockdep/test.c >> new file mode 100644 >> index 0000000..e69de29 >> lappy lockdep # >> >> So it seems that here patch would cleanly create empty files, what does quilt >> do differently? > > > root@twins:~/tmp# touch ponies > root@twins:~/tmp# git diff /dev/null ponies > diff --git a/ponies b/ponies > new file mode 100644 > index 0000000..e69de29 > root@twins:~/tmp# git diff /dev/null ponies > ponies.patch > root@twins:~/tmp# rm ponies > root@twins:~/tmp# patch < ponies.patch > patch: **** Only garbage was found in the patch input. > > t@twins:~/tmp# patch --version > patch 2.6.1 > Copyright (C) 1988 Larry Wall > Copyright (C) 2003, 2009 Free Software Foundation, Inc. > > This program comes with NO WARRANTY, to the extent permitted by law. > You may redistribute copies of this program > under the terms of the GNU General Public License. > For more information about these matters, see the file named COPYING. > > written by Larry Wall and Paul Eggert >
Ah! # patch --version GNU patch 2.7.1 I've tried downgrading to 2.6.1, and now I get: lappy lockdep # patch < test.patch patch: **** Only garbage was found in the patch input. Thanks, Sasha -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/