Closed gschoeni closed 3 days ago
The changes primarily involve modifications to the DownloadCmd
implementation and related structures to streamline the command-line interface for downloading repositories. A new required argument <URL>
is introduced, replacing the previous host
and remote
parameters. The DownloadOpts
structure is updated accordingly, and a new asynchronous function get_by_url
is added to facilitate repository access using the provided URL. Error handling for URL parsing is also enhanced, improving user feedback.
File Path | Change Summary |
---|---|
src/cli/src/cmd/download.rs |
- Added required argument <URL> to DownloadCmd . - Removed host and remote arguments. - Updated run method to extract host from URL. - Modified opts structure to include only url , paths , dst , and revision . - Replaced get_by_name_host_and_remote with get_by_url . - Enhanced error handling for invalid URLs. |
src/lib/src/api/client/repositories.rs |
- Added new async function get_by_url(url: &str) . - Constructs Remote object and calls get_by_remote . |
src/lib/src/opts/download_opts.rs |
- Added pub url: String to DownloadOpts . - Removed pub host: String and pub remote: String from DownloadOpts . |
In fields of code where rabbits dwell,
A command was changed, oh what a spell!
With a URL now clear,
The path is sincere,
Simplifying tasks, we bid farewell! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
To mirror clone, I changed the download opts
Summary by CodeRabbit
New Features
<URL>
argument for the download command, simplifying the command-line interface.Bug Fixes
Refactor
host
andremote
) from the download options, streamlining the configuration.