git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Add an option to delete a patch from a certain branch

From
PGPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Date
Oct 31, 2005, 20:54 UTC
Message-ID
<20051031205446.2341.98354.stgit@zion.home.lan>
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

Actually, simply adding the option is enough... Restrict print_crt_patch() to the case when we didn't specify --branch (as it's useless otherwise).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
 stgit/commands/delete.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/stgit/commands/delete.py b/stgit/commands/delete.py
--- a/stgit/commands/delete.py
+++ b/stgit/commands/delete.py
@@ -32,8 +32,8 @@ be part of the unapplied list or be the 
 case the command also popping it from the stack. Note that the
 'delete' operation is irreversible."""
 
-options = []
-
+options = [make_option('-b', '--branch',
+                       help = 'use BRANCH instead of the default one')]
 
 def func(parser, options, args):
     """Deletes a patch
@@ -48,4 +48,6 @@ def func(parser, options, args):
 
     crt_series.delete_patch(args[0])
     print 'Patch "%s" successfully deleted' % args[0]
-    print_crt_patch()
+
+    if not options.branch:
+        print_crt_patch()
Message 1 of 1 in “Add an option to delete a patch from a certain branch”
  1. Add an option to delete a patch from a certain branchPaolo 'Blaisorblade' Giarrusso, Oct 31, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.