Git with a cup of tea, painless self-hosted git service
Mirror for internal git.with.parts use
https://git.with.parts
You can not 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
87db4a47c8
Also sync DB branches on push if necessary ( #28361 ) ( #28403 )
...
Fix #28056
Backport #28361
This PR will check whether the repo has zero branch when pushing a
branch. If that, it means this repository hasn't been synced.
The reason caused that is after user upgrade from v1.20 -> v1.21, he
just push branches without visit the repository user interface. Because
all repositories routers will check whether a branches sync is necessary
but push has not such check.
For every repository, it has two states, synced or not synced. If there
is zero branch for a repository, then it will be assumed as non-sync
state. Otherwise, it's synced state. So if we think it's synced, we just
need to update branch/insert new branch. Otherwise do a full sync. So
that, for every push, there will be almost no extra load added. It's
high performance than yours.
For the implementation, we in fact will try to update the branch first,
if updated success with affect records > 0, then all are done. Because
that means the branch has been in the database. If no record is
affected, that means the branch does not exist in database. So there are
two possibilities. One is this is a new branch, then we just need to
insert the record. Another is the branches haven't been synced, then we
need to sync all the branches into database.
12 months ago
..
action.go
Refactor secrets modification logic ( #26873 )
1 year ago
avatar.go
Add missing 404 response to Swagger ( #27038 )
1 year ago
blob.go
Add missing 404 response to Swagger ( #27038 )
1 year ago
branch.go
Also sync DB branches on push if necessary ( #28361 ) ( #28403 )
12 months ago
collaborators.go
More `db.DefaultContext` refactor ( #27265 ) ( #27347 )
1 year ago
commits.go
Filter get single commit ( #24613 )
2 years ago
file.go
Add context parameter to some database functions ( #26055 )
1 year ago
fork.go
Reduce usage of `db.DefaultContext` ( #27073 )
1 year ago
git_hook.go
Add missing 404 response to Swagger ( #27038 )
1 year ago
git_ref.go
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
hook.go
Fix comment permissions ( #28213 ) ( #28216 )
1 year ago
hook_test.go
Move web/api context related testing function into a separate package ( #26859 )
1 year ago
issue.go
Fix comment permissions ( #28213 ) ( #28216 )
1 year ago
issue_attachment.go
More refactoring of `db.DefaultContext` ( #27083 )
1 year ago
issue_comment.go
Fix comment permissions ( #28213 ) ( #28216 )
1 year ago
issue_comment_attachment.go
Fix comment permissions ( #28213 ) ( #28216 )
1 year ago
issue_dependency.go
Add missing 404 response to Swagger ( #27038 )
1 year ago
issue_label.go
Don't let API add 2 exclusive labels from same scope ( #27433 ) ( #27460 )
1 year ago
issue_pin.go
Add missing 404 response to Swagger ( #27038 )
1 year ago
issue_reaction.go
Fix comment permissions ( #28213 ) ( #28216 )
1 year ago
issue_stopwatch.go
Next round of `db.DefaultContext` refactor ( #27089 )
1 year ago
issue_subscription.go
Next round of `db.DefaultContext` refactor ( #27089 )
1 year ago
issue_tracked_time.go
Add missing 404 response to Swagger ( #27038 )
1 year ago
key.go
Fix comment permissions ( #28213 ) ( #28216 )
1 year ago
label.go
Next round of `db.DefaultContext` refactor ( #27089 )
1 year ago
language.go
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
main_test.go
Merge setting.InitXXX into one function with options ( #24389 )
2 years ago
migrate.go
move repository deletion to service layer ( #26948 )
1 year ago
milestone.go
Next round of `db.DefaultContext` refactor ( #27089 )
1 year ago
mirror.go
Add `RemoteAddress` to mirrors ( #26952 )
1 year ago
notes.go
api: GetPullRequestCommits: return file list ( #27483 ) ( #27539 )
1 year ago
patch.go
Add missing 404 response to Swagger ( #27038 )
1 year ago
pull.go
api: GetPullRequestCommits: return file list ( #27483 ) ( #27539 )
1 year ago
pull_review.go
More `db.DefaultContext` refactor ( #27265 ) ( #27347 )
1 year ago
release.go
Fix comment permissions ( #28213 ) ( #28216 )
1 year ago
release_attachment.go
Fix comment permissions ( #28213 ) ( #28216 )
1 year ago
release_tags.go
Fix comment permissions ( #28213 ) ( #28216 )
1 year ago
repo.go
Another round of `db.DefaultContext` refactor ( #27103 ) ( #27262 )
1 year ago
repo_test.go
Move web/api context related testing function into a separate package ( #26859 )
1 year ago
star.go
More refactoring of `db.DefaultContext` ( #27083 )
1 year ago
status.go
Add missing 404 response to Swagger ( #27038 )
1 year ago
subscriber.go
More refactoring of `db.DefaultContext` ( #27083 )
1 year ago
tag.go
Fix comment permissions ( #28213 ) ( #28216 )
1 year ago
teams.go
More refactoring of `db.DefaultContext` ( #27083 )
1 year ago
topic.go
Next round of `db.DefaultContext` refactor ( #27089 )
1 year ago
transfer.go
Next round of `db.DefaultContext` refactor ( #27089 )
1 year ago
tree.go
Add missing 404 response to Swagger ( #27038 )
1 year ago
wiki.go
Add missing 404 response to Swagger ( #27038 )
1 year ago