[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Do we want 'svn patch' to be able to add empty files?

From: Branko ÄŒibej <brane_at_xbc.nu>
Date: Sat, 04 Sep 2010 09:46:35 +0200

 On 04.09.2010 02:44, Augie Fackler wrote:
>
> On Sep 3, 2010, at 7:10 AM, Daniel Näslund wrote:
>
>> On Fri, Sep 03, 2010 at 12:18:37PM +0200, Branko ÄŒibej wrote:
>>> On 02.09.2010 10:50, Branko ÄŒibej wrote:
>>>> Hmm, this is interesting. :) Git faithfully (blindly?) interprets Unix
>>>> permission bits, whiles SVN faithfully (blindly?) interprets the
>>>> contents of special files ... I wonder if "svn patch" does the right
>>>> thing here?
>>>>
>>>> Anyway, for the sake of interoperability, we'd have to emit and parse
>>>> the git format for symlinks. Not that I'm too amused by the idea that
>>>> git probably just does a chmod on the new file without thinking about
>>>> it, but hey, All the World is Linux, right? :)
>>>
>>> Did some testing ... apparently "git apply" completely ignores the
>>> permission bits "new file mode ..." line, at least I haven't been able
>>> to force it to do anything with them.
>>
>> From builtin/apply::try_create_file() in the git source code:
>>
>> fd = open(path, O_CREAT | O_EXCL | O_WRONLY, (mode & 0100) ? 0777 :
>> 0666);
>> if (fd < 0)
>> return -1;
>>
>> Git only checks for the executable bit, AFAIK.
>
> Correct, git and hg only store files as 0644 or 0755. Everything else
> gets handled by the umask on the user's machine.

Nice ... that's equivalent to svn:executable. And see, I was right about
the magic numbers. :)

-- Brane
Received on 2010-09-04 09:47:22 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.