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

Set no-tags in git fetch on compare #20893

Merged
merged 4 commits into from
Aug 23, 2022

Conversation

zeripath
Copy link
Contributor

In the compare endpoint the git fetch is restricted to a certain branch however,
this does not completely prevent tag acquisition/pollution as git fetch will collect
any tags on that branch.

This causes pollution of the tag namespace and could cause confusion by users.

This PR adds --no-tags to the git fetch call.

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

In the compare endpoint the git fetch is restricted to a certain branch however,
this does not completely prevent tag acquisition/pollution as git fetch will collect
any tags on that branch.

This causes pollution of the tag namespace and could cause confusion by users.

This PR adds `--no-tags` to the `git fetch` call.

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 Aug 23, 2022
modules/git/repo_compare.go Outdated Show resolved Hide resolved
@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 Aug 23, 2022
modules/git/repo_compare.go Outdated Show resolved Hide resolved
@techknowlogick
Copy link
Member

ping l-g-t-m

@techknowlogick techknowlogick merged commit aa2e473 into go-gitea:main Aug 23, 2022
@zeripath zeripath deleted the set-no-tags-in-compare-fetch branch August 23, 2022 18:39
zeripath added a commit to zeripath/gitea that referenced this pull request Aug 23, 2022
Backport go-gitea#20893

In the compare endpoint the git fetch is restricted to a certain branch however,
this does not completely prevent tag acquisition/pollution as git fetch will collect
any tags on that branch.

This causes pollution of the tag namespace and could cause confusion by users.

This PR adds `--no-tags` to the `git fetch` call.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the backport/done All backports for this PR have been created label Aug 23, 2022
techknowlogick pushed a commit that referenced this pull request Aug 23, 2022
Backport #20893

In the compare endpoint the git fetch is restricted to a certain branch however,
this does not completely prevent tag acquisition/pollution as git fetch will collect
any tags on that branch.

This causes pollution of the tag namespace and could cause confusion by users.

This PR adds `--no-tags` to the `git fetch` call.

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

Signed-off-by: Andrew Thornton <art27@cantab.net>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 24, 2022
* giteaofficial/main:
  Display total blob size of a package version. (go-gitea#20927)
  Display all files. (go-gitea#20917)
  Enhance package date display (go-gitea#20928)
  [skip ci] Updated translations via Crowdin
  Forbid HTML string tooltips (go-gitea#20935)
  Set no-tags in git fetch on compare (go-gitea#20893)
  Update comparison.en-us.md: link subgroups issue (go-gitea#20905)
  Enable contenthash in filename for dynamic assets (go-gitea#20813)
  refactor webhook *EditPost (go-gitea#20780)
vsysoev pushed a commit to IntegraSDL/gitea that referenced this pull request Aug 28, 2022
* Set no-tags in git fetch on compare

In the compare endpoint the git fetch is restricted to a certain branch however,
this does not completely prevent tag acquisition/pollution as git fetch will collect
any tags on that branch.

This causes pollution of the tag namespace and could cause confusion by users.

This PR adds `--no-tags` to the `git fetch` call.

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

* Update modules/git/repo_compare.go

* Update modules/git/repo_compare.go

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
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.

6 participants