~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
StGIT bash completion
[stgit]
/
stgit
/
commands
/
clean.py
diff --git
a/stgit/commands/clean.py
b/stgit/commands/clean.py
index
efd85c2
..
baa4a54
100644
(file)
--- a/
stgit/commands/clean.py
+++ b/
stgit/commands/clean.py
@@
-24,7
+24,11
@@
from stgit import stack, git
help = 'delete the empty patches in the series'
help = 'delete the empty patches in the series'
-usage = """%prog [options]"""
+usage = """%prog [options]
+
+Delete the empty patches in the whole series or only those applied or
+unapplied. A patch is considered empty if the two commit objects
+representing its boundaries refer to the same tree object."""
options = [make_option('-a', '--applied',
help = 'delete the empty applied patches',
options = [make_option('-a', '--applied',
help = 'delete the empty applied patches',
@@
-61,7
+65,8
@@
def func(parser, options, args):
if options.applied:
applied = crt_series.get_applied()
if options.applied:
applied = crt_series.get_applied()
- crt_series.pop_patch(applied[0])
+ if applied != []:
+ crt_series.pop_patch(applied[0])
__delete_empty(applied, True)
if options.unapplied:
__delete_empty(applied, True)
if options.unapplied: