Skip to content

Conversation

@lunny
Copy link
Member

@lunny lunny commented Sep 28, 2025

Refactor Git command functions to use WithXXX methods instead of exposing RunOpts.
This change simplifies reuse across gitrepo and improves consistency, encapsulation, and maintainability of command options.

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Sep 28, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 28, 2025
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin labels Sep 28, 2025
@lunny lunny marked this pull request as ready for review September 29, 2025 19:10
@lunny lunny added this to the 1.26.0 milestone Sep 29, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 4, 2025
@wxiaoguang wxiaoguang force-pushed the lunny/refactor_gitrepo branch from f92fa33 to d19dc35 Compare October 5, 2025 07:36
@wxiaoguang wxiaoguang force-pushed the lunny/refactor_gitrepo branch from d19dc35 to 0e834b0 Compare October 5, 2025 07:39
@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 Oct 7, 2025
@wxiaoguang wxiaoguang merged commit 69f5ee9 into go-gitea:main Oct 7, 2025
26 checks passed
@wxiaoguang wxiaoguang deleted the lunny/refactor_gitrepo branch October 7, 2025 09:06
@lunny lunny mentioned this pull request Oct 8, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Oct 9, 2025
* giteaofficial/main:
  Fixing issue go-gitea#35530: Password Leak in Log Messages (go-gitea#35584)
  Move some functions to gitrepo package (go-gitea#35543)
  feat: adds option to force update new branch in contents routes (go-gitea#35592)
  Move archive function to repo_model and gitrepo (go-gitea#35514)
  Use `inputs` context when parsing workflows (go-gitea#35590)
techknowlogick pushed a commit that referenced this pull request Oct 12, 2025
To prevent potential bugs, the logic in #35543 makes `gitcmd.Command`
panic when attempting to override stdout or stderr. Instead of using
`PrepareCmd`, this PR now uses the WithXXX methods directly to avoid the
panic.

Fix #35603
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/go Pull requests that update Go code modifies/migrations type/refactoring Existing code has been cleaned up. There should be no new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants