You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lunny Xiao f9cfd6ce5b
Use the type RefName for all the needed places and fix pull mirror sync bugs (#24634)
This PR replaces all string refName as a type `git.RefName` to make the
code more maintainable.

Fix #15367
Replaces #23070 
It also fixed a bug that tags are not sync because `git remote --prune
origin` will not remove local tags if remote removed.

We in fact should use `git fetch --prune --tags origin` but not `git
remote update origin` to do the sync.

Some answer from ChatGPT as ref.

> If the git fetch --prune --tags command is not working as expected,
there could be a few reasons why. Here are a few things to check:
> 
>Make sure that you have the latest version of Git installed on your
system. You can check the version by running git --version in your
terminal. If you have an outdated version, try updating Git and see if
that resolves the issue.
> 
>Check that your Git repository is properly configured to track the
remote repository's tags. You can check this by running git config
--get-all remote.origin.fetch and verifying that it includes
+refs/tags/*:refs/tags/*. If it does not, you can add it by running git
config --add remote.origin.fetch "+refs/tags/*:refs/tags/*".
> 
>Verify that the tags you are trying to prune actually exist on the
remote repository. You can do this by running git ls-remote --tags
origin to list all the tags on the remote repository.
> 
>Check if any local tags have been created that match the names of tags
on the remote repository. If so, these local tags may be preventing the
git fetch --prune --tags command from working properly. You can delete
local tags using the git tag -d command.

---------

Co-authored-by: delvh <dev.lh@web.de>
1 year ago
..
actions Implement actions artifacts (#22738) 1 year ago
setting Move secrets and runners settings to actions settings (#24200) 1 year ago
activity.go Implement FSFE REUSE for golang files (#21840) 2 years ago
attachment.go Decouple the different contexts from each other (#24786) 1 year ago
blame.go Sort repo topic labels by name (#24123) 1 year ago
branch.go Use the type RefName for all the needed places and fix pull mirror sync bugs (#24634) 1 year ago
cherry_pick.go Rename almost all Ctx functions (#22071) 2 years ago
commit.go Pass 'not' to commit count (#24473) 1 year ago
compare.go Don't list root repository on compare page if pulls not allowed (#24183) 1 year ago
download.go Decouple the different contexts from each other (#24786) 1 year ago
editor.go Create pull request for base after editing file, if not enabled on fork (#24841) 1 year ago
editor_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
find.go Implement FSFE REUSE for golang files (#21840) 2 years ago
helper.go Refactor authors dropdown (send get request from frontend to avoid long wait time) (#23890) 1 year ago
helper_test.go Refactor authors dropdown (send get request from frontend to avoid long wait time) (#23890) 1 year ago
http.go Decouple the different contexts from each other (#24786) 1 year ago
http_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue.go Use the type RefName for all the needed places and fix pull mirror sync bugs (#24634) 1 year ago
issue_content_history.go Move helpers to be prefixed with `gt-` (#22879) 1 year ago
issue_dependency.go Add API to manage issue dependencies (#17935) 1 year ago
issue_label.go Make label templates have consistent behavior and priority (#23749) 1 year ago
issue_label_test.go Make label templates have consistent behavior and priority (#23749) 1 year ago
issue_lock.go Fix improper HTMLURL usages in Go code (#22839) 1 year ago
issue_pin.go Add the ability to pin Issues (#24406) 1 year ago
issue_stopwatch.go Speed up HasUserStopwatch & GetActiveStopwatch (#23051) 1 year ago
issue_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_timetrack.go Fix improper HTMLURL usages in Go code (#22839) 1 year ago
issue_watch.go Rewrite logger system (#24726) 1 year ago
lfs.go Introduce path Clean/Join helper functions (#23495) 1 year ago
main_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
middlewares.go Use graceful editorconfig loader to reduce errors when loading malformed editorconfigs (#21257) 1 year ago
migrate.go Make repo migration cancelable and fix various bugs (#24605) 1 year ago
milestone.go Improve Gitea's web context, decouple "issue template" code into service package (#24590) 1 year ago
packages.go Use dynamic package type list (#22263) 2 years ago
patch.go Redirect to the commit page after applying patch (#23056) 1 year ago
projects.go Add unset default project column (#23531) 1 year ago
projects_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
pull.go Add IsErrRepoFilesAlreadyExist check when fork repo (#24678) 1 year ago
pull_review.go Make Ctrl+Enter submit a pending comment (starting review) instead of submitting a single comment (#23245) 1 year ago
release.go fix: release page for empty or non-existing target (#24470) 1 year ago
release_test.go fix: release page for empty or non-existing target (#24470) 1 year ago
render.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Remove the parallelizing when loading repo for dashboard (#24705) 1 year ago
search.go Fix improper HTMLURL usages in Go code (#22839) 1 year ago
setting.go Refactor Pull Mirror and fix out-of-sync bugs (#24732) 1 year ago
setting_protected_branch.go Support for status check pattern (#24633) 1 year ago
settings_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
tag.go Add main landmark to templates and adjust titles (#22670) 1 year ago
topic.go Implement FSFE REUSE for golang files (#21840) 2 years ago
treelist.go Implement FSFE REUSE for golang files (#21840) 2 years ago
view.go Improve Gitea's web context, decouple "issue template" code into service package (#24590) 1 year ago
view_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
webhook.go New webhook trigger for receiving Pull Request review requests (#24481) 1 year ago
wiki.go Decouple the different contexts from each other (#24786) 1 year ago
wiki_test.go Make wiki title supports dashes and improve wiki name related features (#24143) 1 year ago