quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] .pc file permissions


From: Andreas Gruenbacher
Subject: Re: [Quilt-dev] .pc file permissions
Date: Fri, 6 Oct 2006 09:39:37 +0200
User-agent: KMail/1.9.1

On Friday 06 October 2006 08:13, Dave Dodge wrote:
> On Thu, Oct 05, 2006 at 08:41:38PM -0700, Andrew Morton wrote:
> > It gave me a few permissionless files:
> >
> > vmm:/home/akpm/e2fsprogs-1.39> l .pc/01-head_20060918/lib/e2p/percent.c
> > ----------    1 akpm     akpm            0 Oct  6 12:25
> > .pc/01-head_20060918/lib/e2p/percent.c
> >
> > Is that expected?
>
> Yes.  When a pushed patch creates a new file in the tree, it results
> in an empty file with 000 permissions under .pc.

Yes, GNU patch does that, to distinguish creating a file from modifying an 
empty file:

        $ echo f > f
        $ diff -u /dev/null f > 1.diff
        $ echo "" > f.orig
        $ diff -u f.orig f > 2.diff
        $ rm f f.orig

        $ patch --backup < 1.diff
        > patching file f
        $ ls -l f.orig | cut -d ' ' -f1
        > ----------

        $ rm f.orig
        $ echo "" > f
        $ patch --backup < 1.diff
        > The next patch would create the file f,
        > which already exists!  Assume -R? [n]
        > Apply anyway? [n]
        > Skipping patch.
        > 1 out of 1 hunk ignored -- saving rejects to file f.rej

        $ patch --backup < 2.diff
        > patching file f
        $ ls -l f.orig | cut -d ' ' -f1
        > -rw-r--r--

        $ rm -f f f.orig f.rej 1.diff 2.diff

I don't think the GNU patch behavior makes a lot of sense; nobody cares about 
this distinction.

Quilt could honor the backup file mode to decide when to remove a file vs. to 
leave an empty file around. Right not it doesn't, but neither does it work 
around GNU patch.

Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]