You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2026/08/26 15:52:21 UTC

(allura) 01/01: [#8620] fix space handling in renamed files

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch db/8620
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 4f2ddeabaabbec33f520b370c0ed04a3dce9cf42
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Tue Aug 25 18:41:36 2026 -0400

    [#8620] fix space handling in renamed files
---
 Allura/allura/templates/widgets/repo/log.html | 2 +-
 ForgeGit/forgegit/model/git_repo.py           | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Allura/allura/templates/widgets/repo/log.html b/Allura/allura/templates/widgets/repo/log.html
index 4ac51e3e3..0e363da69 100644
--- a/Allura/allura/templates/widgets/repo/log.html
+++ b/Allura/allura/templates/widgets/repo/log.html
@@ -58,7 +58,7 @@
                 {% if commit.rename_details %}
                     <div>
                       <b>renamed from</b>
-                      <a href={{commit.rename_details['commit_url']}}log/?path={{ commit.rename_details['path'] }} rel="nofollow">
+                      <a href="{{commit.rename_details['commit_url']}}log/?path={{ commit.rename_details['path'] }}" rel="nofollow">
                         {{ commit.rename_details['path'] }}
                       </a>
                     </div>
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index 8159f01ec..6a3b900ac 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -477,7 +477,7 @@ def _iter_commits_with_refs(self, *args, **kwargs):
         Then log returns something like this:
             <commit hash>x00 <refs>
             \n # empty line
-            R100 <renamed from path> <renamed to path> # when rename happens
+            R100\t<renamed from path>\t<renamed to path> # when rename happens
             A\t<some path> # other cases
             D\t<some path> # other cases
             etc
@@ -493,7 +493,7 @@ def _iter_commits_with_refs(self, *args, **kwargs):
                 # hash line read, need to yield previous commit
                 # first, cleaning lines a bit
                 commit_lines = [
-                    ln.strip('\n ').replace('\t', ' ')
+                    ln.strip('\n ')
                     for ln in commit_lines if ln.strip('\n ')
                 ]
                 if commit_lines:
@@ -511,7 +511,7 @@ def _iter_commits_with_refs(self, *args, **kwargs):
                     renamed = {}
                     # merge commits don't have any --name-status output
                     if len(commit_lines) > 1:
-                        name_stat_parts = commit_lines[1].split(' ')
+                        name_stat_parts = commit_lines[1].split('\t')
                         if name_stat_parts[0] == 'R100':
                             renamed['from'] = name_stat_parts[1]
                             renamed['to'] = name_stat_parts[2]