Skip to content

Fix NPE on view commit with notes #15561

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

Merged
merged 2 commits into from
Apr 21, 2021

Conversation

zeripath
Copy link
Contributor

There is a mistake with the native git variant of GetNote when the note is referring to a non-root path.

This PR simply splits the path and passes the basedir into GetLastCommitPaths separate from the root path.

Fix #15558

Signed-off-by: Andrew Thornton [email protected]

@zeripath
Copy link
Contributor Author

Hopefully @eveslage will be able to confirm that this does indeed fix the issue.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 20, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #15561 (88f39bf) into master (5e85cda) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #15561   +/-   ##
=======================================
  Coverage   43.80%   43.81%           
=======================================
  Files         678      678           
  Lines       81730    81734    +4     
=======================================
+ Hits        35803    35809    +6     
+ Misses      40087    40086    -1     
+ Partials     5840     5839    -1     
Impacted Files Coverage Δ
modules/git/notes_nogogit.go 71.42% <100.00%> (+3.68%) ⬆️
services/pull/pull.go 43.02% <0.00%> (ø)
modules/git/commit_info_nogogit.go 69.80% <0.00%> (+0.99%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e85cda...88f39bf. Read the comment docs.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 21, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 21, 2021
@zeripath
Copy link
Contributor Author

make lgtm work

@zeripath zeripath merged commit 1cd8d0c into go-gitea:master Apr 21, 2021
@zeripath zeripath deleted the fix-15558-notes-path branch April 21, 2021 18:00
zeripath added a commit to zeripath/gitea that referenced this pull request Apr 21, 2021
techknowlogick pushed a commit that referenced this pull request Apr 21, 2021
@6543 6543 added the backport/done All backports for this PR have been created label Apr 30, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] uters/routes/base.go:153:1() [E] PANIC: runtime error: invalid memory address or nil pointer dereference
5 participants