Skip to main content

Unison Gitignore

PyPI version

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 by unison

    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.

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)

Source distribution for unison-gitignore 1.0.5
File Size Uploaded
unison-gitignore-1.0.5.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unison-gitignore 1.0.5
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page