0
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-18 21:40:08 +01:00
forgejo/models
Lunny Xiao f9cfd6ce5b
Use the type RefName for all the needed places and fix pull mirror sync bugs ()
This PR replaces all string refName as a type `git.RefName` to make the
code more maintainable.

Fix 
Replaces  
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>
2023-05-26 01:04:48 +00:00
..
actions Use the type RefName for all the needed places and fix pull mirror sync bugs () 2023-05-26 01:04:48 +00:00
activities Use the type RefName for all the needed places and fix pull mirror sync bugs () 2023-05-26 01:04:48 +00:00
admin Make repo migration cancelable and fix various bugs () 2023-05-11 08:25:46 +00:00
asymkey Merge setting.InitXXX into one function with options () 2023-05-04 11:55:35 +08:00
auth
avatars
db Rewrite logger system () 2023-05-21 22:35:11 +00:00
dbfs Merge setting.InitXXX into one function with options () 2023-05-04 11:55:35 +08:00
fixtures Implement actions artifacts () 2023-05-19 21:37:57 +08:00
git Fix missed table name on iterate lfs meta objects () 2023-05-17 23:51:22 +08:00
issues Add the ability to pin Issues () 2023-05-25 15:17:19 +02:00
migrations Add the ability to pin Issues () 2023-05-25 15:17:19 +02:00
organization Add missing test case and fix typo in tests () 2023-05-24 21:06:04 +02:00
packages Add CRAN package registry () 2023-05-22 10:57:49 +08:00
perm Rewrite logger system () 2023-05-21 22:35:11 +00:00
project
pull
repo Rewrite logger system () 2023-05-21 22:35:11 +00:00
secret Respect original content when creating secrets () 2023-05-16 14:49:40 +08:00
shared/types Display owner of a runner as a tooltip instead of static text () 2023-05-12 08:43:27 +00:00
system
unit Rewrite logger system () 2023-05-21 22:35:11 +00:00
unittest Implement actions artifacts () 2023-05-19 21:37:57 +08:00
user New webhook trigger for receiving Pull Request review requests () 2023-05-24 22:06:27 -04:00
webhook New webhook trigger for receiving Pull Request review requests () 2023-05-24 22:06:27 -04:00
error.go
fixture_generation.go
fixture_test.go
main_test.go Merge setting.InitXXX into one function with options () 2023-05-04 11:55:35 +08:00
migrate.go
migrate_test.go
org.go
org_team.go
org_team_test.go
org_test.go
repo.go Implement actions artifacts () 2023-05-19 21:37:57 +08:00
repo_collaboration.go
repo_collaboration_test.go
repo_test.go
repo_transfer.go
repo_transfer_test.go