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

Error opening Pull requests with changed git submodules #6945

Closed
1 of 4 tasks
ukos-git opened this issue May 14, 2019 · 5 comments · Fixed by #6996
Closed
1 of 4 tasks

Error opening Pull requests with changed git submodules #6945

ukos-git opened this issue May 14, 2019 · 5 comments · Fixed by #6996
Labels
Milestone

Comments

@ukos-git
Copy link

  • Gitea version:
  • Git version: 345bc06
  • Operating system: docker container
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Log gist:

Description

Opening a new pull request for a freshly pushed branch sometimes gives an error with an unformated html file and the following message in a <pre> tag:

template: repo/diff/box:109:21: executing "repo/diff/box" at <call $.IsImageFile $file.Name>: error calling call: runtime error: invalid memory address or nil pointer dereference

url for this is gitea.xyz/user/repo/compare/master...branch

Not sure if this helps but this is the last line of the gitea.log:

_issues`, `05/14 12:03:42 ^[[0m^[[32m...xorm/session_find.go:195:^[[32mnoCacheFind()^[[0m ^[[1;32m[I]^[[0m [SQL] ^[[1mSELECT `id`, `repo_id`, `name`, `content`, `is_closed`, `num_issues`, `05/14 12:03:42 ^[[0m^[[32m...xorm/session_find.go:195:^[[32mnoCacheFind()^[[0m ^[[1;32m[I]^[[0m [SQL] ^[[1mSELECT `id`, `user_id`, `repo_id`, `mode` FROM `access` WHERE (repo_id 05/14 12:03:42 ^[[0m^[[32m...s/context/context.go:138:^[[32mHTML()^[[0m ^[[1;34m[D]^[[0m Template: ^[[1mrepo/pulls/compare^[[0m
@lafriks
Copy link
Member

lafriks commented May 14, 2019

Could it be that it is for added or deleted files?

@lafriks lafriks added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label May 14, 2019
@ukos-git
Copy link
Author

I did the following to fix the error:

  • reset one file that was staged for deletion
  • rebased the branch on current master
  • took everything to a new branch

Now the pull request works but it feels like a workaround.

@saitho
Copy link
Contributor

saitho commented May 19, 2019

I just stumbled upon the same issue. In my case it happens when the diff contains a submodule.
Like here: https://try.gitea.io/saitho/test2/compare/noimage...submodule2

@ukos-git
Copy link
Author

I also have submodules activated for that branch but I also have git lfs active. Is there a possibility to add a bit more debug output for what is happening here?

@lunny
Copy link
Member

lunny commented May 19, 2019

So the problem is when your PR has a submodule. @ukos-git Could you change the title?

@ukos-git ukos-git changed the title Error on opening Pull request Error opening Pull requests with changed git submodules May 20, 2019
zeripath added a commit to zeripath/gitea that referenced this issue May 21, 2019
@lafriks lafriks added type/bug and removed issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail labels May 22, 2019
@lafriks lafriks added this to the 1.9.0 milestone May 22, 2019
@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.

4 participants