X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/7c47eea5bf3e1af67b06417fa2fbda093b7e8c37..ceba3178f434c2a1fc4c839459efe15b9953fe7c:/stgit/commands/show.py diff --git a/stgit/commands/show.py b/stgit/commands/show.py index 5c297c0..a270efd 100644 --- a/stgit/commands/show.py +++ b/stgit/commands/show.py @@ -41,10 +41,13 @@ options = [make_option('-a', '--applied', def func(parser, options, args): """Show commit log and diff """ + applied = crt_series.get_applied() + unapplied = crt_series.get_unapplied() + if options.applied: - patches = crt_series.get_applied() + patches = applied elif options.unapplied: - patches = crt_series.get_unapplied() + patches = unapplied elif len(args) == 0: patches = ['HEAD'] else: @@ -53,8 +56,7 @@ def func(parser, options, args): # it might be just a commit id patches = args else: - patches = parse_patches(args, crt_series.get_applied() - + crt_series.get_unapplied()) + patches = parse_patches(args, applied + unapplied, len(applied)) commit_ids = [git_id(patch) for patch in patches] commit_str = '\n'.join([git.pretty_commit(commit_id)