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 the git ref is unable to be found return broken pr #13218

Merged

Conversation

zeripath
Copy link
Contributor

Fix #13216

Signed-off-by: Andrew Thornton art27@cantab.net

Fix go-gitea#13216

Signed-off-by: Andrew Thornton <art27@cantab.net>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 20, 2020
Copy link
Member

@a1012112796 a1012112796 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right.
By the way, maybe should set LANG envirment verb when init gitea to en_US.UFT-8 to make sure git print error message in english.
for example
image

@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 Oct 20, 2020
Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will fix the 500 but wont fix the 13216 !

@zeripath
Copy link
Contributor Author

@a1012112796 #8548

cmd := exec.CommandContext(ctx, c.name, c.args...)
if env == nil {
cmd.Env = append(os.Environ(), fmt.Sprintf("LC_ALL=%s", DefaultLocale))
} else {
cmd.Env = env
cmd.Env = append(cmd.Env, fmt.Sprintf("LC_ALL=%s", DefaultLocale))
}

@6543
Copy link
Member

6543 commented Oct 20, 2020

wait ... I'll test some more

@6543
Copy link
Member

6543 commented Oct 20, 2020

  1. create repo A
  2. frok repo A to repo B
  3. backup bare repo A
  4. create feature branch on B and add some commits
  5. create pull from B to A & squash-merge
  6. clone A to local disk
  7. restore backup of A
  8. push local clone back to gitea

without this pull: 500
with this pull: working pull view but N/A on "Files changed"-Tab

what I expect to fix 13216 -> cliking on Files-Changed will show the diff based on merged-commit as fallback

Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice bugfix - wont fix ref issue

@lunny lunny merged commit 0aec2a2 into go-gitea:master Oct 20, 2020
@zeripath zeripath deleted the fix-13216-handle-missing-head-information branch October 20, 2020 12:54
ivanvc added a commit to ivanvc/gitea that referenced this pull request Oct 21, 2020
…ments-in-pull-request-label-style

* origin/master: (27 commits)
  [skip ci] Updated translations via Crowdin
  add more clarification to the issue-template.md (go-gitea#13235)
  go-version constraints ignore pre-releases (go-gitea#13234)
  [skip ci] Updated translations via Crowdin
  Update some JS dependencies (go-gitea#13222)
  Return the full rejection message and errors in flash errors (go-gitea#13221)
  Update heatmap fixtures to restore tests (go-gitea#13224)
  [skip ci] Updated translations via Crowdin
  Add review request api (go-gitea#11355)
  [skip ci] Updated translations via Crowdin
  When the git ref is unable to be found return broken pr (go-gitea#13218)
  Various arc-green fixes (go-gitea#13214)
  Show stale label for stale code comment which is marked as resolved (go-gitea#13213)
  Move install pages out of main macaron routes (go-gitea#13195)
  Use CSS Variables for fonts, remove postcss-loader (go-gitea#13204)
  [skip ci] Updated translations via Crowdin
  Align `SSH_AUTHORIZED_KEYS_BACKUP` var with the value in `app.ini` (go-gitea#13212)
  Fix size and clickable area on file table back link (go-gitea#13205)
  [skip ci] Updated translations via Crowdin
  Fix error in diff html rendering (go-gitea#13191)
  ...
zeripath added a commit to zeripath/gitea that referenced this pull request Oct 25, 2020
@zeripath zeripath added the backport/done All backports for this PR have been created label Oct 25, 2020
techknowlogick pushed a commit that referenced this pull request Oct 25, 2020
)

Backport #13218

Fix #13216

Signed-off-by: Andrew Thornton <art27@cantab.net>
@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
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.

Add Fallback for Pulls Diff when missing commits
5 participants