Gogs: When a file is modified and renamed within the same commit the rename does not display in the pull request.

Created on 21 Feb 2018  路  3Comments  路  Source: gogs/gogs

Description

In some cases when viewing diffs on files for a pull request it does not show the change in file name.
It appears to happen when the file is renamed and some lines are added or modified.

the commands performed to recreate:

  • Create a new repository with the README.md included.
  • Checkout the repository: git clone repourl .
  • Rename file: git mv README.md README2.md
  • Modify file: echo "update content" >> README2.md
  • Commit changes: git commit -am 'update and rename file'
  • Push to a new branch: git push origin master:devel
  • Create a pull request of the devel branch compared to master

Additionally if you try to click the View File button it will take you to a 404 page because README.md is now README2.md

I have found that the above issue does not always appear.
See https://try.gogs.io/xuu/filename-example/pulls/1/files
where nearly the same steps were taken but it does not display the error.
...

馃拪 bug

Most helpful comment

I am facing the same issue. Renaming of file is not showing and rendering returning 404 page. The issue occurs especially in the when the only change in the name is case change.
For example renaming Architecture.md to architecture.md.

All 3 comments

I am facing the same issue. Renaming of file is not showing and rendering returning 404 page. The issue occurs especially in the when the only change in the name is case change.
For example renaming Architecture.md to architecture.md.

Same problem for me using:
Gogs Version: 0.11.86.0130
5.5.60-MariaDB
git version 1.8.3.1
CentOS Linux release 7.6.1810 (Core)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ogarcia picture ogarcia  路  3Comments

suriyaa picture suriyaa  路  3Comments

fromiuan picture fromiuan  路  3Comments

galactics picture galactics  路  3Comments

tmplt picture tmplt  路  3Comments