Fix the import --edit function
authorCatalin Marinas <catalin.marinas@gmail.com>
Tue, 23 Aug 2005 16:19:22 +0000 (17:19 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Tue, 23 Aug 2005 16:19:22 +0000 (17:19 +0100)
If the patch doesn't have any description, the editor is invoked twice,
once by new_patch and the 2nd time by refresh_patch. This patch fixes
this issue.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/imprt.py

index 879599b..9dccaf9 100644 (file)
@@ -172,6 +172,10 @@ def func(parser, options, args):
         message, author_name, author_email, author_date = \
                  __parse_patch(filename)
 
+    # new_patch() will invoke the editor in this case
+    if not message:
+        edit = False
+
     # override the automatically parsed settings
     if options.authname:
         author_name = options.authname