Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] index: be careful when handling long names

From: Alex Riesen <hidden>
Date: 2016-06-15 22:44:05

Junio C Hamano, Mon, Jan 14, 2008 00:08:07 +0100:
Alex Riesen [off-list ref] writes:
quoted
Junio C Hamano, Sun, Jan 13, 2008 23:36:34 +0100:
quoted
+test_expect_success 'very long name in the index handled sanely' '
+
+	a=a && # 1
+	a=$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a && # 16
+	a=$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a && # 256
+	a=$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a && # 4096
I'd expect it to fail on some systems (everywindowsthing up to w2k,
maybe some commercial unices).
My understanding is that Everywindowsthing do not come with any
(POSIX compliant) shell that we support by default, so if you
are talking about a limit of shell variable value, I do not
think it is an issue to begin with.  It is just the matter of
Oh, right. The file system wont even see it, it is passed directly to
update-index.
picking a sensible shell (I understand both Cygwin and msys
ports use a shell that supports more than 4k bytes in value
given to a variable).
can't check right now, but I believe it is so
I would agree that it might overflow the argument limit when
this is given to "echo", though.  We cannot do much about it,
but you may have cleverer ideas.
I thought about conditionally disabling the test, like it was done
when the tabs in filenames had to be tested. Wont be needed for this
particular case.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help