lkml.org 
[lkml]   [2013]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/9] liblockdep: Wrap kernel/lockdep.c to allow usage from userspace
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



\
 
 \ /
  Last update: 2013-05-10 16:21    [W:0.087 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site