clone command #14

Merged
krauterbaquette merged 4 commits from cmd-clone into main 2024-12-22 13:44:48 +00:00

Adding implementation for the sac clone command.

It is a complete git wrapper and only needed for 'all-in-one-tooling'.

Adding implementation for the `sac clone` command. It is a complete `git` wrapper and only needed for 'all-in-one-tooling'.
implemented basic clone command
Some checks failed
Rust Checks / Run Rust Check (push) Failing after 3s
d372b8c7ab
complete git wrapper \
TODO: implement better error handeling
Author
Owner

TODO

Improve error messages:

  • no internet connection
  • connection timeout
  • no git repository
  • not allowed to access repository
### TODO Improve error messages: - [x] no internet connection - [x] connection timeout - [x] no git repository - [ ] ~not allowed to access repository~
krauterbaquette force-pushed cmd-clone from d372b8c7ab
Some checks failed
Rust Checks / Run Rust Check (push) Failing after 3s
to 603125c7d0 2024-12-21 17:40:44 +00:00
Compare
improved error messages for clone
Some checks failed
Rust Checks / Run Rust Check (push) Failing after 3s
7700e73abf
- truncate the 'Cloning into' part
- improve 'not found' error
added internet problem errors
Some checks failed
Rust Checks / Run Rust Check (push) Failing after 3s
baaa52fed1
add error for already existing directory
Some checks failed
Rust Checks / Run Rust Check (push) Failing after 2s
ceb8df4c23
Author
Owner

Test

For testing a remote repository is needed.
For example: https://git.solarpunk.social/GTA-HEG/demo.git

Clone

Clone the git repository

$ sac clone https://git.solarpunk.social/GTA-HEG/demo.git

Clone into different directory

$ sac clone https://git.solarpunk.social/GTA-HEG/demo.git demo2

Clone into existing directory

If ./demo already exists

$ sac clone https://git.solarpunk.social/GTA-HEG/demo.git

This should error with a useful message

Clone with no internet

Disconnect from the internet

$ sac clone https://git.solarpunk.social/GTA-HEG/demo.git

This should error with a useful message

Clone non existing repo

$ sac clone https://example.com

This should error with a useful message

# Test For testing a remote repository is needed. For example: https://git.solarpunk.social/GTA-HEG/demo.git ## Clone Clone the git repository ``` $ sac clone https://git.solarpunk.social/GTA-HEG/demo.git ``` ## Clone into different directory ``` $ sac clone https://git.solarpunk.social/GTA-HEG/demo.git demo2 ``` ## Clone into existing directory > If `./demo` already exists ``` $ sac clone https://git.solarpunk.social/GTA-HEG/demo.git ``` This should error with a useful message ## Clone with no internet > Disconnect from the internet ``` $ sac clone https://git.solarpunk.social/GTA-HEG/demo.git ``` This should error with a useful message ## Clone non existing repo ``` $ sac clone https://example.com ``` This should error with a useful message
krauterbaquette changed title from WIP: clone command to clone command 2024-12-21 18:15:10 +00:00
aviac approved these changes 2024-12-22 05:48:34 +00:00
aviac left a comment
Contributor

Clean

Clean
krauterbaquette deleted branch cmd-clone 2024-12-22 13:44:48 +00:00
krauterbaquette referenced this pull request from a commit 2024-12-22 13:44:49 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
krauterbaquette/sac!14
No description provided.