A unison wrapper to integrate with .gitignore
Project description
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
!pattern
in the same way as git does:b/ !b/c/test.py
test.py
will not be ignored in git, but will be ignored byunison
The 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file unison-gitignore-1.0.5.tar.gz
.
File metadata
- Download URL: unison-gitignore-1.0.5.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c416976da3a8e90831a7edcd38fd31d95b955c6710e40d47bf7767222813c49e |
|
MD5 | 6dda9d92927600ccd0f9754b3a47a06c |
|
BLAKE2b-256 | 0bd6202d7f577da41aba1660304e1bbc82c7da8090d1322d13dac29c15bf6b1c |
File details
Details for the file unison_gitignore-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: unison_gitignore-1.0.5-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5992571ca2dda8a25b6b86faaae7930e6ffdc38862fe0cc1f511e9c27917a0e0 |
|
MD5 | 0242a4948acb84ca02c18c5135091497 |
|
BLAKE2b-256 | 70fb49fffdb3b9e831e6e0c759d80339a5a060f92a909535493a35a60a919e84 |