Skip to content

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 [email protected]

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 <[email protected]>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Aug 23, 2022
@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
@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 <[email protected]>
@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 <[email protected]>

Signed-off-by: Andrew Thornton <[email protected]>
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 <[email protected]>

* Update modules/git/repo_compare.go

* Update modules/git/repo_compare.go

Signed-off-by: Andrew Thornton <[email protected]>
@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