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

Add single comment when reviewing code in deleted file generates fatal: no such path #4752

Closed
2 of 8 tasks
mkienenb opened this issue Aug 20, 2018 · 4 comments · Fixed by #4682
Closed
2 of 8 tasks
Labels
Milestone

Comments

@mkienenb
Copy link

Gitea version (or commit ref):

/var/lib/gitea>sudo /usr/local/bin/gitea --version
Gitea version 1b2aff0 built with: bindata, sqlite
[master snapshot grabbed on Aug 15th]

  • Git version:
    git version 2.18.0

  • Operating system:
    CentOS release 6.4 (Final)

  • Database (use [x]):

    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No
    • Not relevant
    • Very likely, but I couldn't turn up an example PR to comment on right away.
  • Log gist:

    2018/08/20 09:29:23 [.../repo/pull_review.go:77 CreateCodeComment()] [E] CreateCodeComment: LineBlame[refs/pull/1/head, /home/git/gitea-repositories/mlk/ebill.git, WEB-INF/lib/.gitignore, 1]: exit status 128 - fatal: no such path WEB-INF/lib/.gitignore in refs/pull/1/head

Description

Attempting to add a review comment to a deleted file generates an error and

  1. Create PR including deleted file
  2. Click "Files changed"
  3. Click "+" on any line of a deleted file.
  4. Enter any comment.
  5. Click "Add single comment"

Generates log entry above. Redirects to 500 Internal Server Error page.

Screenshots

See before and after here.

https://gist.github.com/mkienenb/016013ce9a50653ec02859d9fff14415

@mkienenb mkienenb changed the title add single comment when reviewing code in deleted file generates fatal: no such path Add single comment when reviewing code in deleted file generates fatal: no such path Aug 20, 2018
@mkienenb
Copy link
Author

@lafriks Ping.

@lunny lunny added the type/bug label Aug 21, 2018
@lunny lunny added this to the 1.6.0 milestone Aug 21, 2018
@lafriks
Copy link
Member

lafriks commented Aug 21, 2018

Was PR created from fork on same repository other branch?

@mkienenb
Copy link
Author

Was PR created from fork on same repository other branch?

It's hard to understand what you are asking.

User A owns the repo. User B is a collaborator (administrator) for the repo.
User B pushed some-branch to User A's repo and created a PR.

lafriks added a commit to lafriks-fork/gitea that referenced this issue Sep 16, 2018
@lafriks
Copy link
Member

lafriks commented Sep 16, 2018

PR #4682 fixes this issue

lafriks added a commit that referenced this issue Sep 17, 2018
* Code review UI improvements

* More fixes to dark theme

* Style fix

* Fix to allow add code review comments only on review files tab

* More readability dark style fixes

* Fix commenting on deleted files. Fixes #4752

* Fix line blame getting for multiple corner cases
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants