Unison Gitignore
A gitignore-aware wrapper around Unison
unison-gitignore will walk the local root and any supplied paths finding gitignore files and then call
unison with the appropriate unison ignore patterns
Usage
First install it:
pip install unison-gitignore
Then use:
unison-gitignore /home/john_doe/local_root ssh://remote_root/ -path data
It accepts the exact same arguments as unison
Caveats
-
Will not add patterns when using two local roots:
Unison does the match without the root attached, so a .gitignore file in either root would apply to both local roots
-
Will not add patterns when profile usage method is used
-
Does not handle
!patternin the same way as git does:b/ !b/c/test.pytest.pywill not be ignored in git, but will be ignored byunisonThe Unison reference says this:
Unison starts detecting updates from the root of the replicas—i.e., from the empty path. If the empty path matches an ignore pattern and does not match an ignorenot pattern, then the whole replica will be ignored. (For this reason, it is not a good idea to include Name * as an ignore pattern. If you want to ignore everything except a certain set of files, use Name ?*.)
If the root is a directory, Unison continues looking for updates in all the immediate children of the root. Again, if the name of some child matches an ignore pattern and does not match an ignorenot pattern, then this whole path including everything below it will be ignored.
If any of the non-ignored children are directories, then the process continues recursively.
So any negated files or directories that are not direct children of an ignored directory will be ignored improperly.
Release files for unison-gitignore 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| unison-gitignore-1.0.5.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| unison_gitignore-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:16.2 kB
Release files / unison-gitignore-1.0.5.tar.gz
| Download URL | unison-gitignore-1.0.5.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c416976da3a8e90831a7edcd38fd31d95b955c6710e40d47bf7767222813c49e
|
|
BLAKE2b-256 checksum How to use checksums |
0bd6202d7f577da41aba1660304e1bbc82c7da8090d1322d13dac29c15bf6b1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / unison_gitignore-1.0.5-py3-none-any.whl
| Download URL | unison_gitignore-1.0.5-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5992571ca2dda8a25b6b86faaae7930e6ffdc38862fe0cc1f511e9c27917a0e0
|
|
BLAKE2b-256 checksum How to use checksums |
70fb49fffdb3b9e831e6e0c759d80339a5a060f92a909535493a35a60a919e84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|