Skip to content

Commit af92a04

Browse files
committed
Remove -o option from diff and commit (fixes #54)
1 parent b67a73d commit af92a04

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gitless/cli/helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ def __call__(self, parser, namespace, revs, option_string=None):
151151

152152
def oei_flags(subparsers, repo):
153153
subparsers.add_argument(
154-
'-o', '--only', nargs='+',
155-
help='use only files given (files must be tracked modified or untracked)',
154+
'only', nargs='*',
155+
help='use only files given (tracked modified or untracked)',
156156
action=PathProcessor, repo=repo, metavar='file')
157157
subparsers.add_argument(
158158
'-e', '--exclude', nargs='+',
@@ -204,7 +204,7 @@ def _oei_validate(only, exclude, include, curr_b):
204204
"""
205205
if only and (exclude or include):
206206
pprint.err(
207-
'You provided a list of filenames to be committed only (-o) but also '
207+
'You provided a list of filenames to be committed but also '
208208
'provided a list of files to be excluded (-e) or included (-i)')
209209
return False
210210

gitless/tests/test_e2e.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def setUp(self):
353353
super(TestDiffFile, self).setUp()
354354
utils.write_file(self.TRACKED_FP)
355355
utils.write_file(self.DIR_TRACKED_FP)
356-
gl.commit('-o', self.TRACKED_FP, self.DIR_TRACKED_FP, m='commit')
356+
gl.commit(self.TRACKED_FP, self.DIR_TRACKED_FP, m='commit')
357357
utils.write_file(self.UNTRACKED_FP)
358358

359359
def test_empty_diff(self):
@@ -472,7 +472,7 @@ def test_only_one(self):
472472
self.__build(self.OTHER, cids=[0]) + self.__build('master'))
473473

474474
def test_only_some(self):
475-
gl.fuse(self.OTHER, '-o', self.commits[self.OTHER][:2])
475+
gl.fuse(self.OTHER, self.commits[self.OTHER][:2])
476476
self.__assert_history(
477477
self.__build(self.OTHER, [0, 1]) + self.__build('master'))
478478

0 commit comments

Comments
 (0)