Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 of 7 tasks
jonlundy opened this issue Feb 21, 2018 · 3 comments
Labels
💊 bug Something isn't working
Projects
Milestone

Comments

@jonlundy
Copy link
Contributor

jonlundy commented Feb 21, 2018

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.
...

@unknwon unknwon added 💊 bug Something isn't working status: needs reproduce Wait, how did that happen? labels Aug 17, 2018
@hemani19
Copy link

hemani19 commented Nov 14, 2018

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.

@joyartoun
Copy link

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)

@unknwon
Copy link
Member

unknwon commented Mar 30, 2020

Should be fixed by #6048.

@unknwon unknwon closed this as completed Mar 30, 2020
@unknwon unknwon removed the status: needs reproduce Wait, how did that happen? label Mar 30, 2020
@unknwon unknwon modified the milestones: Triaging priority, 0.12 Mar 30, 2020
@unknwon unknwon added this to Done in 0.12 Mar 30, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💊 bug Something isn't working
Projects
No open projects
0.12
  
Done
Development

No branches or pull requests

4 participants