From e9b9f42cf0849cd2ab8dbdd6bad0bdefdc7a8e01 Mon Sep 17 00:00:00 2001 From: Qihang Cai Date: Tue, 21 May 2024 19:56:46 +0800 Subject: [PATCH 1/4] add basic README for `libra` Signed-off-by: Qihang Cai --- libra/README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/libra/README.md b/libra/README.md index 474aace76..ff1bbe2e9 100644 --- a/libra/README.md +++ b/libra/README.md @@ -1 +1,49 @@ -## Libra \ No newline at end of file +## Libra +`libra` is a `Git` Client in `Rust`. + +## Features +### Clean Code +Our code is designed to be clean and easy to read, +ensuring that it is both maintainable and understandable for developers of all skill levels. + +### Cross-Platform +- [x] Windows +- [x] Linux +- [x] MacOS + +### Compatibility with Git +Our implementation is essentially fully compatible with `Git` +(developed with reference to the `Git` documentation), +including formats such as `objects`, `index`, `pack`, and `pack-index`. +Therefore, it can interact seamlessly with `Git` servers (like `push` and `pull`). + +### Differences from Git: +While maintaining compatibility with `Git`, we have made some innovations and changes: +we use an `SQLite` database to manage loosely structured files such as `config`, `HEAD`, and `refs`, +achieving unified management. + +## Functions +### Commands +- [x] `init` +- [x] `add` +- [x] `status` +- [x] `commit` +- [x] `log` +- [ ] `tag` +- [x] `switch` +- [x] `restore` +- [ ] `reset` +- [x] `branch` +- [ ] `diff` +- [x] `merge` +- [ ] `rebase` +- [x] `index-pack` +- [x] `remote` +- [ ] `config` +- [x] `push` +- [x] `pull` +- [x] `clone` +- [x] `fetch` + +### Others +- [ ] `.gitignore` and `.gitattributes` \ No newline at end of file From 55b113565e32b4c42ee30548c0d2cb42f9b1e9d8 Mon Sep 17 00:00:00 2001 From: Qihang Cai Date: Tue, 21 May 2024 20:06:15 +0800 Subject: [PATCH 2/4] README: add `rm` Signed-off-by: Qihang Cai --- libra/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/libra/README.md b/libra/README.md index ff1bbe2e9..ce8a982b2 100644 --- a/libra/README.md +++ b/libra/README.md @@ -26,6 +26,7 @@ achieving unified management. ### Commands - [x] `init` - [x] `add` +- [x] `rm` - [x] `status` - [x] `commit` - [x] `log` From 8c4f46a8676095981fde051743c94380b5367aef Mon Sep 17 00:00:00 2001 From: Hou Xiaoxuan Date: Tue, 21 May 2024 22:55:15 +0800 Subject: [PATCH 3/4] README: add `Example` Signed-off-by: Hou Xiaoxuan --- libra/README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/libra/README.md b/libra/README.md index ce8a982b2..3578eef29 100644 --- a/libra/README.md +++ b/libra/README.md @@ -1,6 +1,35 @@ ## Libra `libra` is a `Git` Client in `Rust`. +## Example +``` +$ libra --help +Simulates git commands + +Usage: libra + +Commands: + init Initialize a new repository + clone Clone a repository into a new directory + add Add file contents to the index + rm Remove files from the working tree and from the index + restore Restore working tree files + status Show the working tree status + log Show commit logs + branch List, create, or delete branches + commit Record changes to the repository + switch Switch branches + merge Merge changes + push Update remote refs along with associated objects + fetch Download objects and refs from another repository + pull Fetch from and integrate with another repository or a local branch + remote Manage set of tracked repositories + help Print this message or the help of the given subcommand(s) + +Options: + -h, --help Print help + -V, --version Print version +``` ## Features ### Clean Code Our code is designed to be clean and easy to read, @@ -47,4 +76,6 @@ achieving unified management. - [x] `fetch` ### Others -- [ ] `.gitignore` and `.gitattributes` \ No newline at end of file +- [ ] `.gitignore` and `.gitattributes` +- [ ] `lfs` +- [ ] `submodule` \ No newline at end of file From 425031e57f20672230f30bcb8cfe25e46b3e8a73 Mon Sep 17 00:00:00 2001 From: Qihang Cai Date: Sat, 25 May 2024 14:39:22 +0800 Subject: [PATCH 4/4] remove `submodule`, add `ssh` Signed-off-by: Qihang Cai --- libra/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libra/README.md b/libra/README.md index 3578eef29..00e08fb10 100644 --- a/libra/README.md +++ b/libra/README.md @@ -70,6 +70,7 @@ achieving unified management. - [x] `index-pack` - [x] `remote` - [ ] `config` +#### Remote - [x] `push` - [x] `pull` - [x] `clone` @@ -78,4 +79,4 @@ achieving unified management. ### Others - [ ] `.gitignore` and `.gitattributes` - [ ] `lfs` -- [ ] `submodule` \ No newline at end of file +- [ ] `ssh` \ No newline at end of file