-
Notifications
You must be signed in to change notification settings - Fork 111
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
NF: Introduce always_commit option #143
Conversation
are we becoming lazy? how would I know that it works? ;) |
Haha - just wanted to know whether you agree on having the whole thing in always-commit-mode. May be you want to see it as an option for single commands only. |
yarik: we can do one step at a time ;-) but tests would be relevant in any case ;-) |
Added test for always-commit-mode.
@@ -152,6 +156,14 @@ def _run_annex_command(self, annex_cmd, git_options=[], annex_options=[], | |||
debug = ['--debug'] if lgr.getEffectiveLevel() <= logging.DEBUG else [] | |||
backend = ['--backend=%s' % backend] if backend else [] | |||
|
|||
if git_options is None: | |||
git_options = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git_options = git_options or []
could have worked as well ;-)
@@ -152,6 +156,12 @@ def _run_annex_command(self, annex_cmd, git_options=[], annex_options=[], | |||
debug = ['--debug'] if lgr.getEffectiveLevel() <= logging.DEBUG else [] | |||
backend = ['--backend=%s' % backend] if backend else [] | |||
|
|||
git_options = git_options[:] if git_options else [] | |||
annex_options = annex_options[:] if annex_options else [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
theoretically it wasn't needed here, since we didn't modify it, right? (but ok to leave in -- just trying to see if I am not missing anything)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah -- [:]
wasn't needed what I meant... anyways -- ignore ;) better be safe than sorry
NF: Introduce always_commit option
As proposed herein, always_commit works as a mode of operation. Set to false to not instantly commit changes by git-annex calls.
Note: windows fails due to issue #147