Re: git on MacOSX and files with decomposed utf-8 file names

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git on MacOSX and files with decomposed utf-8 file names

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:07

ebiederm@xmission.com (Eric W. Biederman) writes:
Junio C Hamano [off-list ref] writes:
quoted
I'd rather see our mental bandwidth spent on coming up with a
workable workaround for such broken filesystems, while not
hurting use of git on sane platforms.

I fear it might have to end up to be very messy and slow,
though.
Random thought.  Would it make sense to implement a git paranoid
mode to autodetect name mangling.

I.e.  After opening or creating a file by name we do a readdir in the
same directory to make certain we can find that same name/inode
combination.  Then on name-mangling systems we can autodetect they
exist and limit ourselves to just what they don't mangle with no
prior knowledge.  By refusing to process names that actively
get mangled.   For small directories that you frequently see in
development it shouldn't even be that slow.
Inside init-db where we already check how the filesystem
behaves, we could have an autodetection. A rough equivalent of
what I had in mind is:

	mkdir -p "Märchen/Märchen"
	if test "$(cd Märchen && echo M*)" = "Märchen"
        then
        	: not mangling
	else
        	git config core.namemangle true
	fi

(of course we do that in C not in shell).

Re: git on MacOSX and files with decomposed utf-8 file names

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:44:07

On Tue, 22 Jan 2008, Junio C Hamano wrote:
ebiederm@xmission.com (Eric W. Biederman) writes:
quoted
Random thought.  Would it make sense to implement a git paranoid
mode to autodetect name mangling.

I.e.  After opening or creating a file by name we do a readdir in the
same directory to make certain we can find that same name/inode
combination.  Then on name-mangling systems we can autodetect they
exist and limit ourselves to just what they don't mangle with no
prior knowledge.  By refusing to process names that actively
get mangled.   For small directories that you frequently see in
development it shouldn't even be that slow.
Inside init-db where we already check how the filesystem
behaves, we could have an autodetection.
I wonder if that is good enough.  Git repositories can be copied over to 
different filesystems.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help