A 'refresh' command clears the status of the modified, new and deleted
files."""
-directory = DirectoryHasRepository()
+directory = DirectoryHasRepository(needs_current_series = False)
options = [make_option('-m', '--modified',
help = 'show modified files only',
action = 'store_true'),
make_option('-x', '--noexclude',
help = 'do not exclude any files from listing',
action = 'store_true'),
- make_option('-O', '--diff-opts',
- help = 'options to pass to git-diff'),
make_option('--reset',
help = 'reset the current tree changes',
- action = 'store_true')]
+ action = 'store_true')
+ ] + make_diff_opts_option()
-def status(files = None, modified = False, new = False, deleted = False,
- conflict = False, unknown = False, noexclude = False,
- diff_flags = []):
+def status(files, modified, new, deleted, conflict, unknown, noexclude,
+ diff_flags):
"""Show the tree status
"""
cache_files = git.tree_status(files,
if options.reset:
if args:
- for f in args:
- resolved(f)
+ conflicts = git.get_conflicts()
+ git.resolved(fn for fn in args if fn in conflicts)
git.reset(args)
else:
resolved_all()
git.reset()
else:
- if options.diff_opts:
- diff_flags = options.diff_opts.split()
- else:
- diff_flags = []
-
status(args, options.modified, options.new, options.deleted,
options.conflict, options.unknown, options.noexclude,
- diff_flags = diff_flags)
+ options.diff_flags)