Thread (12 messages) flat view 12 messages, 2 authors, 2016-06-15
DORMANTno replies

[patch 02/11] Make "empty patch" checking optional in "series" command.

From: Paolo 'Blaisorblade' Giarrusso <hidden>
Date: 2016-06-15 22:42:06
Subsystem: the rest · Maintainer: Linus Torvalds

That's just too slow, and quilt doesn't do it, so user will live with it.
Don't know if there's a reason to allow dropping the fanciness here
entirely, but I think there's no user doing one-liner scripts with quilt
series. And anyway, for that you can do "stg applied; stg unapplied".

Actually, with this patch you must ask explicitly the checking.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <redacted>
---

 stgit/commands/series.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/stgit/commands/series.py b/stgit/commands/series.py
--- a/stgit/commands/series.py
+++ b/stgit/commands/series.py
@@ -31,7 +31,10 @@ Show all the patches in the series. The 
 with a '+' and the unapplied ones with a '-'. The current patch is
 prefixed with a '>'. Empty patches are prefixed with a '0'."""
 
-options = []
+options = [make_option('-e', '--empty',
+                       help = 'check whether patches are empty '
+                       '(much slower)',
+                       action = 'store_true') ]
 
 
 def func(parser, options, args):
@@ -43,19 +46,19 @@ def func(parser, options, args):
     applied = crt_series.get_applied()
     if len(applied) > 0:
         for p in applied [0:-1]:
-            if crt_series.empty_patch(p):
+            if options.empty and crt_series.empty_patch(p):
                 print '0', p
             else:
                 print '+', p
         p = applied[-1]
 
-        if crt_series.empty_patch(p):
+        if options.empty and crt_series.empty_patch(p):
             print '0>%s' % p
         else:
             print '> %s' % p
 
     for p in crt_series.get_unapplied():
-        if crt_series.empty_patch(p):
+        if options.empty and crt_series.empty_patch(p):
             print '0', p
         else:
             print '-', p
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help