Skip to content

Commit 3f35fcd

Browse files
committed
fix CLI for single revisions
The CLI unconditionally passes all argument to rev-list, even if the argument is a single commit rather than a revision range. This causes the CLI to always analyse the entire git history up to the given commit, rather than just that commit. The web mode does not have this problem, and this fix copies the pattern used there. Introduced in d601e35.
1 parent 9a741f0 commit 3f35fcd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

git-deps.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,11 @@ def cli(options, args):
703703
options.multi = True
704704

705705
for revspec in args:
706-
revs = GitUtils.rev_list(revspec)
706+
if '..' in revspec:
707+
revs = GitUtils.rev_list(revspec)
708+
else:
709+
revs = [revspec]
710+
707711
if len(revs) > 1:
708712
options.multi = True
709713

0 commit comments

Comments
 (0)