Skip to content

Commit

Permalink
Merge pull request #1 from zdharma-continuum/ci/gh-action-lint-workflow
Browse files Browse the repository at this point in the history
feat: add lint gh action workflows
  • Loading branch information
vladdoster committed Apr 16, 2023
2 parents 852cfaf + 8d7d52c commit 996638c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 31 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Lint

on:
pull_request:
branches: [main, master]
push:
branches: [main, master]
tags: ["v*.*.*"]
workflow_dispatch:

jobs:
commit:
uses: zdharma-continuum/.github/.github/workflows/commit-job.yml@main
lint:
uses: zdharma-continuum/.github/.github/workflows/lint-job.yml@main
62 changes: 31 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# git-url

This package adds two Git commands:
- **url** – generates so called *giturl* which encodes repository fetch-URL and revision
(can also hold paths to files); example giturl: `gitu://ҝjȩMżEäḝЃȣϟṈӛŀї` (points to
`master` branch of this project),
- **guclone** – clones given giturl, checkouts revision stored in this giturl.

- **url** – generates so called *giturl* which encodes repository fetch-URL and revision (can also hold paths to files);
example giturl: `gitu://ҝjȩMżEäḝЃȣϟṈӛŀї` (points to `master` branch of this project),
- **guclone** – clones given giturl, checkouts revision stored in this giturl.

In short:
1. The giturls use 1024 **unicode letters** via base-1024 encoding, and also Huffman codes,
to compress resulting string.
- **SMALL SIZE**
2. Thanks to using glyphs that are **letters** (not symbols) double clicking on giturl always
selects whole string, regardless if it's done in e.g. Firefox, Chrome, iTerm2, xterm, etc.
- **CALM SELECTING**
3. `git url ...` and `git guclone ...` understand giturls also without leading `gitu://`, and
with leading `//`, so grabbing and using such url is easy.
- **EASY USE**
4. You can encode path to file in the giturl, to e.g. point someone to a location in project.
- **PACKED WITH DATA**

1. The giturls use 1024 **unicode letters** via base-1024 encoding, and also Huffman codes, to compress resulting
string.
- **SMALL SIZE**
1. Thanks to using glyphs that are **letters** (not symbols) double clicking on giturl always selects whole string,
regardless if it's done in e.g. Firefox, Chrome, iTerm2, xterm, etc.
- **CALM SELECTING**
1. `git url ...` and `git guclone ...` understand giturls also without leading `gitu://`, and with leading `//`, so
grabbing and using such url is easy.
- **EASY USE**
1. You can encode path to file in the giturl, to e.g. point someone to a location in project.
- **PACKED WITH DATA**

Compare length of the above example giturl to the data it stores:

Expand All @@ -34,8 +35,8 @@ https://github.com/zdharma/git-urlmaster

#### make install

Recursively clone and run `make install`. Default install location is `/usr/local`. It
can be overriden by setting `PREFIX`, e.g. `make install PREFIX=/opt`.
Recursively clone and run `make install`. Default install location is `/usr/local`. It can be overriden by setting
`PREFIX`, e.g. `make install PREFIX=/opt`.

```sh
git clone --recursive https://github.com/zdharma/git-url
Expand All @@ -56,16 +57,15 @@ To update, execute `zplugin update zdharma/git-url`. `$ZPFX` is `~/.zplugin/pola

#### Extra info

The project uses two subprojects, one of them written in C++ (compiled with CMake), second
one in Zshell. They are the computation backends, and any of the two will work (choose with
`export GITURL_TOOL=zgiturl` or `...=cgiturl`).
The project uses two subprojects, one of them written in C++ (compiled with CMake), second one in Zshell. They are the
computation backends, and any of the two will work (choose with `export GITURL_TOOL=zgiturl` or `...=cgiturl`).

# Limitations

Only a subset of ASCII is encoded. This is sufficient for typical Github usage, where user and
repository name are required to not use symbols, and where typical project branch names and
file names are simple ASCII. Following characters can appear in input data – in the server,
repository path, user name, revision, file path: [a-zA-Z0-9._~:/-].
Only a subset of ASCII is encoded. This is sufficient for typical Github usage, where user and repository name are
required to not use symbols, and where typical project branch names and file names are simple ASCII. Following
characters can appear in input data – in the server, repository path, user name, revision, file path:
\[a-zA-Z0-9.\_~:/-\].

# Encoding file paths

Expand All @@ -75,14 +75,14 @@ Use `-p` option to embed path to file in giturl:
% git url -p lib/common.sh
Encoding... INPUT is next paragraph:

Protocol: https
Site: github.com
Repo: zdharma/zplugin.git
Revision: master
File: lib/common.sh
Protocol: https
Site: github.com
Repo: zdharma/zplugin.git
Revision: master
File: lib/common.sh

gitu://ŬϽẝá0ȘéőϞȳƾDZϠѝŌěcḆΚṳȣϟṈӛŀї
```

Suggested is to use tilde `~` to separate multiple file paths. The project can be easily
extended if this workaround will not suffice, to encode multiple file paths natively.
Suggested is to use tilde `~` to separate multiple file paths. The project can be easily extended if this workaround
will not suffice, to encode multiple file paths natively.

0 comments on commit 996638c

Please sign in to comment.