On Fri, Oct 05, 2012 at 10:36:52AM +1000, Andrew Ardill wrote: > On 5 October 2012 10:29, Jeff King <p...@peff.net> wrote: > >... > > > >but it feels a little fake. Why 200? Because that will test the config > >limit, but will not overflow the NAME_MAX limit (at least not on > >Linux! No clue on other platforms) when we try to create > >refs/heads/foo-$z200. > > I can't test this particular case right now, but I recently had an > issue with Windows Server 2008 due to a long filename, that > essentially meant I couldn't move, change owner or change permissions > on the given file. Unless someone has more info I can test a bit > later. Is the idea that we shouldn't allow filenames that will cause > issues with the underlying OS (or other people's OS) or something > else?
I don't think it's that we shouldn't allow such filenames. It's only that the test is flaky, because making the branch name long enough to test the relaxed config code means that we may run afoul of filesystem limitations on creating the ref itself. It's a separate issue whether we should restrict the length of branch names in order to protect against filesystem limits. I tend to think not, as we handle the filesystem error just fine. The only reason to do so would be to protect people on multi-system projects (e.g., you make a long branch name on Linux that cannot be fetched to a Windows system. Or something; I did not check the limits for those systems). But I have never heard of that happening in practice, so I think we can ignore it for now. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html