Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Ignore Command #166

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

WillFantom
Copy link

Simply added an toggle-ignore command that sets files to be ignored by dropbox or synced via the filesystem extended attributes.

Not only can a file or directory's ignored state be toggled, but also a set of files/directories based on a .gitignore style file (as suggested in issue #125). This can be done by instead of specifying a file to toggle, by proving the gitignore style file to be used along with the -g flag.

Examples:

  • Assuming the file example-file.md is within a Dropbox directory (thus has the xattr com.dropbox.attrs) and is currently synced, running the following would set it to be ignored:

    dbxcli toggle-ignore example-file.md

    and running the same again would set it back to being synced.

  • Assuming the file .gitignore is in the current directory, and contains just example/ and test.*, running the following would toggle the ignored state of all the files within those defined scopes. e.g. example/a/b, test.a, test.b would be toggled:

    dbxcli toggle-ignore -g .gitignore

Added ignore command to allow for the setting and unsetting of the dropbox ignore extended file attribute

Signed-off-by: Will Fantom <willfantom@gmail.com>
Signed-off-by: Will Fantom <willfantom@gmail.com>
@WillFantom
Copy link
Author

Also, the issue #157 should be closable with this 👍 However, an important distinction to make is that of syncing from a given point, or syncing at all. This PR implements the latter.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bandtank
Copy link

bandtank commented Nov 3, 2023

adding a flag specifically for git sounds like a good idea, but it has a lot of potential to go wrong if the git ignore file has complex expressions. i would remove that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants