https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-08-06T10:03:30ZRedmineRedmine - Defect #6054: Error 500 on filenames with whitespace in git repositieshttps://www.redmine.org/issues/6054?journal_id=190572010-08-06T10:03:30ZFelix Schäfer
<ul></ul><p>Can't reproduce on trunk, see here <a class="external" href="http://orga.fachschaften.org/projects/sandbox-git/repository">http://orga.fachschaften.org/projects/sandbox-git/repository</a></p>
<p>What git version do you have installed?</p> Redmine - Defect #6054: Error 500 on filenames with whitespace in git repositieshttps://www.redmine.org/issues/6054?journal_id=191802010-08-10T15:04:03ZGeorg Lukas
<ul></ul><p>Sorry Felix, your link requires a login so I can't test. Do you have filenames with whitespace or repository path/name with whitespace? My problem only occured with the former.</p>
<p>I'm running Debian stable with:<br /><pre>
$ git --version
git version 1.5.6.5
</pre></p> Redmine - Defect #6054: Error 500 on filenames with whitespace in git repositieshttps://www.redmine.org/issues/6054?journal_id=191852010-08-10T18:29:33ZFelix Schäfer
<ul></ul><p>Sorry, I thought it was public (which it should have been), it is public now.</p>
<p>I have a file <code>whitespace filename.txt</code> in the repo, git version string is <code>git version 1.7.1</code>.</p> Redmine - Defect #6054: Error 500 on filenames with whitespace in git repositieshttps://www.redmine.org/issues/6054?journal_id=192322010-08-11T11:41:35ZGeorg Lukas
<ul></ul><p>Ah, now I see that it does not crash Redmine any more. However it does not display the revision and change information for that file. If you add another file without whitespace, I am pretty sure you will see its revision, author etc. columns. Could you please try to do so and compare the output with/without my patch?</p>
<p>The version of git on the other hand should not matter - it is solely an issue with file name quoting.</p> Redmine - Defect #6054: Error 500 on filenames with whitespace in git repositieshttps://www.redmine.org/issues/6054?journal_id=192432010-08-11T16:15:10ZFelix Schäfer
<ul><li><strong>Affected version (unused)</strong> changed from <i>0.8.4</i> to <i>devel</i></li><li><strong>Affected version</strong> deleted (<del><i>0.8.4</i></del>)</li></ul><p>Ah, I now see what you mean and can confirm the bug on trunk.</p>
<p>Could you see if other places in the git adapter are concerned and maybe even write a test for that? Thanks!</p> Redmine - Defect #6054: Error 500 on filenames with whitespace in git repositieshttps://www.redmine.org/issues/6054?journal_id=192482010-08-11T16:40:29ZGeorg Lukas
<ul></ul><p>From a quick glance the path quoting problem seems to affect <code>GitAdapter.revisions()</code> as well. Other subtle but bad things will probably happen in <code>GitAdapter.entries()</code> and <code>GitAdapter.revisions()</code> when file names <em>start</em> with whitespace.</p>
<p>The adapter might also freak out badly if the repository directory contains spaces in its path - I see no quoting at all for <code>target('')</code>.</p>
<p>Regarding the test, I fear I can not help you much - I have exactly zero coding experience in Ruby.</p> Redmine - Defect #6054: Error 500 on filenames with whitespace in git repositieshttps://www.redmine.org/issues/6054?journal_id=204762010-09-19T16:46:20ZFelix Schäfer
<ul><li><strong>Target version</strong> set to <i>1.0.2</i></li></ul><p>This commit fixes the missing shell_quote s in the git_adapter: <a class="external" href="http://github.com/thegcat/redmine/commit/5d5c60d5d4d09aca61239f269fa8904328d9952e">http://github.com/thegcat/redmine/commit/5d5c60d5d4d09aca61239f269fa8904328d9952e</a> The tests in this commit will only work with the fixes in <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Age column on repository view is skewed for git, probably CVS too (Closed)" href="https://www.redmine.org/issues/6346">#6346</a>.</p>
<p><a class="user active" href="https://www.redmine.org/users/10100">jb grenot</a>: could you commit both to trunk? Thanks.</p> Redmine - Defect #6054: Error 500 on filenames with whitespace in git repositieshttps://www.redmine.org/issues/6054?journal_id=207462010-09-26T19:06:37ZEric Davis
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Eric Davis</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed in <a class="changeset" title="Support spaces in the files or directories in the git adapter. #6054 Contributed by Felix Schäfer" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4188">r4188</a>. I found another issue if the file has leading or trailing whitespace, Felix said he will try to work on a fix (<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Files with leading or trailing whitespace are not shown in git. (Closed)" href="https://www.redmine.org/issues/6499">#6499</a>).</p> Redmine - Defect #6054: Error 500 on filenames with whitespace in git repositieshttps://www.redmine.org/issues/6054?journal_id=207602010-09-26T22:21:21ZEric Davis
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul><p>Merged into 1.0-stable</p>