From f6a145792eb99984956a1240c30aea4295b34fc1 Mon Sep 17 00:00:00 2001 From: linrongbin16 Date: Mon, 8 Jan 2024 15:06:27 +0800 Subject: [PATCH 1/3] chore(docs): wording --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 11b3837..a20aba0 100644 --- a/README.md +++ b/README.md @@ -65,11 +65,6 @@ Full [Git Protocols](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protoc - `~/home/to/the/repo.git` - `/usr/home/to/the/repo.git` -All of above can be written by: - -1. `[{protocol}://][[{user}[:{password}]@]host[:{port}]]/[{org}/]*{repo}` -2. `[.|..|~][/{org}]*/{repo}` - ## Install `luarocks install giturlparser` From 29e3e4ad37621f5a2cbb841920ce3ac22d250938 Mon Sep 17 00:00:00 2001 From: linrongbin16 Date: Mon, 8 Jan 2024 15:08:52 +0800 Subject: [PATCH 2/3] chore --- README.md | 51 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index a20aba0..77c7561 100644 --- a/README.md +++ b/README.md @@ -47,23 +47,40 @@ Full [Git Protocols](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protoc > 4. The `[]+` contains 1 or more (≥ 1) component. > 5. The `|` inside `[]` is **_or_** operator. -1. `{protocol}://[[{user}[:{password}]@]{host}[:{port}]]/[{org}/]*{repo}`, for example: - - `http://host.xyz/repo.git` - - `https://git@127.0.0.1:12345/repo.git` - - `ssh://username:password@host.xyz:port/path/to/the/repo.git` - - `ssh://host.xyz:port/path/to/the/repo.git` - - `file:///repo.git` - - `file://user:passwd@host.xyz:port/path/to/the/repo.git` - - `file://~/home/to/the/repo.git` -2. `[{user}[:{password}]@]{host}:[{org}/]*{repo}`, for example: - - `git@host.xyz:repo.git` - - `user:passwd@host.xyz:path/to/the/repo.git` -3. `[.|..|~][/{org}]*/{repo}`, for example: - - `repo.git` - - `./repo.git` - - `../path/to/the/repo.git` - - `~/home/to/the/repo.git` - - `/usr/home/to/the/repo.git` +### Full Pattern + +`{protocol}://[[{user}[:{password}]@]{host}[:{port}]]/[{org}/]*{repo}` + +For example: + +- `http://host.xyz/repo.git` +- `https://git@127.0.0.1:12345/repo.git` +- `ssh://username:password@host.xyz:port/path/to/the/repo.git` +- `ssh://host.xyz:port/path/to/the/repo.git` +- `file:///repo.git` +- `file://user:passwd@host.xyz:port/path/to/the/repo.git` +- `file://~/home/to/the/repo.git` + +### Protocol Omitted Pattern + +`[{user}[:{password}]@]{host}:[{org}/]*{repo}` + +For example: + +- `git@host.xyz:repo.git` +- `user:passwd@host.xyz:path/to/the/repo.git` + +### Local Pattern + +`[.|..|~][/{org}]*/{repo}` + +For example: + +- `repo.git` +- `./repo.git` +- `../path/to/the/repo.git` +- `~/home/to/the/repo.git` +- `/usr/home/to/the/repo.git` ## Install From ebeebf0486517991cd647d59cceda7b32c22e009 Mon Sep 17 00:00:00 2001 From: linrongbin16 Date: Mon, 8 Jan 2024 15:09:20 +0800 Subject: [PATCH 3/3] chore --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77c7561..2b985c6 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Pure Lua implemented git URL parsing library, e.g. the output of git remot Single file & zero dependency. -Full [Git Protocols](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) support: +Full [Git Protocols](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) support (see below). > [!NOTE] >