[StGit PATCH 3/4] Let "stg show" use the unified --diff-opts handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This introduces a small UI change: "stg show" called that flag
--show-opts. This could of course be avoided, but I don't think it's
worth it, since git-diff and git-show accept mostly the same options.

Signed-off-by: Karl Hasselström <kha@xxxxxxxxxxx>

---

Catalin, do you agree?

 stgit/commands/show.py |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)


diff --git a/stgit/commands/show.py b/stgit/commands/show.py
index 72d1be3..b77a9c8 100644
--- a/stgit/commands/show.py
+++ b/stgit/commands/show.py
@@ -38,9 +38,8 @@ options = [make_option('-b', '--branch',
                        action = 'store_true'),
            make_option('-u', '--unapplied',
                        help = 'show the unapplied patches',
-                       action = 'store_true'),
-           make_option('-O', '--show-opts',
-                       help = 'options to pass to "git show"')]
+                       action = 'store_true')
+           ] + make_diff_opts_option()
 
 
 def func(parser, options, args):
@@ -62,13 +61,9 @@ def func(parser, options, args):
             patches = parse_patches(args, applied + unapplied + \
                                     crt_series.get_hidden(), len(applied))
 
-    if options.show_opts:
-        show_flags = options.show_opts.split()
-    else:
-        show_flags = []
-
     commit_ids = [git_id(crt_series, patch) for patch in patches]
-    commit_str = '\n'.join([git.pretty_commit(commit_id, flags = show_flags)
+    commit_str = '\n'.join([git.pretty_commit(commit_id,
+                                              flags = options.diff_flags)
                             for commit_id in commit_ids])
     if commit_str:
         pager(commit_str)

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux