Skip to content

Improve mirror repo url#7093

Merged
waruqi merged 6 commits intodevfrom
mirror
Dec 2, 2025
Merged

Improve mirror repo url#7093
waruqi merged 6 commits intodevfrom
mirror

Conversation

@waruqi
Copy link
Member

@waruqi waruqi commented Dec 2, 2025

@waruqi waruqi added this to the v3.0.6 milestone Dec 2, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @waruqi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing Xmake's handling of Git repositories and network configurations. It introduces a dedicated module for managing Git remote URLs, improves proxy detection for Git operations, and refines how artifact repositories are managed, particularly for Windows. Additionally, it adds new environment variables for better configuration visibility. These changes aim to make Xmake more robust and flexible when interacting with external Git sources and network environments.

Highlights

  • Centralized Git Remote URL Management: A new devel.git.remote module has been introduced to standardize the retrieval and setting of Git remote URLs, improving consistency and maintainability across Git-related operations.
  • Enhanced Proxy Support for Git Operations: The git.pull, git.push, and git.submodule.update modules now leverage the new devel.git.remote module to more accurately determine the appropriate proxy configuration based on the remote URL.
  • Windows-Specific Artifact Repository Handling: The logic for adding artifact repository URLs in core.package.repository has been refined to apply only to Windows hosts, potentially optimizing network requests on other platforms.
  • Dynamic Repository URL Updates: The repo update plugin now includes a mechanism to automatically check and update a local repository's remote URL if it deviates from the expected configuration, ensuring repositories always point to the correct source.
  • Expanded Environment Variable Documentation: Several new environment variables (XMAKE_MAIN_REPO, XMAKE_BINARY_REPO, XMAKE_THEME, XMAKE_STATS) have been added to the show envs plugin's output, providing better visibility into configurable options.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several valuable improvements to repository and git handling. The core change, which automatically updates a repository's remote URL if it differs from the expected one, is a great enhancement for managing mirrors and ensuring repositories stay up-to-date. The introduction of the devel.git.remote module is a solid refactoring that centralizes git remote operations, making the code cleaner and more maintainable. This new module is effectively used to add proxy support for git push and git submodule update, and to simplify the logic in git pull. Additionally, restricting the build-artifacts repository to Windows and documenting new environment variables are welcome changes. Overall, the changes are well-implemented, consistent, and significantly improve the robustness and functionality of xmake's git integration.

@waruqi waruqi merged commit 6e84afe into dev Dec 2, 2025
68 checks passed
@waruqi waruqi deleted the mirror branch December 2, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant