-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Move git command as a standalone package so that it's easier to move the repositories to another machine #18147
Conversation
7de8a0b
to
19cf8ce
Compare
19f24a4
to
e24a459
Compare
ce34612
to
3c386b2
Compare
112282c
to
111de28
Compare
8fd9a4d
to
aa9527a
Compare
If the git package should be refactored to support local/remote, it might be like this:
However, it seems too early to introduce the So the package level refactoring should be made after there is clear requirement and design. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing process.GetManager().Exec
with git.Command.Run
is fine, and RunStdString
could be used to simplify the code.
497abbc
to
03c1045
Compare
Codecov Report
@@ Coverage Diff @@
## main #18147 +/- ##
==========================================
+ Coverage 47.28% 47.30% +0.01%
==========================================
Files 957 959 +2
Lines 133374 133557 +183
==========================================
+ Hits 63067 63179 +112
- Misses 62633 62713 +80
+ Partials 7674 7665 -9
Continue to review full report at Codecov.
|
Since this PR opened, the command has been changed a lot. Just close it. |
still it should be done at some point ... to make it possible to have different back-ends for this, I'll put that on my "long term todos" |
extract from #18147 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
As a step to support distributed Git data storage, I make an abstract git service and command. Currently, just
LocalService
andLocalCommand
has been implemented in this PR. But I think it's not very difficult to implement distributed one after this merged.A new standalone command or a Gitea subcommand could be written to be as a git command service(http/tcp/grpc?). So the git commands could be sent to a remote service and retrieve the result. But this will be in future PRs.