Skip to content

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

Closed
@mkienenb

Description

@mkienenb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions