All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gustav Hållberg" <gustav@virtutech.com>
To: git@vger.kernel.org
Subject: [StGit PATCH] stgit new: Do not open editor if --save-template was specified
Date: Fri, 31 Jul 2009 11:43:21 +0200	[thread overview]
Message-ID: <20090731094301.4336.5496.stgit@lux.e.vtech> (raw)

Fixes side-effect of e58f264a3e59a0887c7aaa1e3227cff108ac840d

I'm not sure this is the right way to fix this problem, but "stgit
new" should not open an editor if the "--save-template" flag was
specified, as it's used as part of batch processes.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
---
 stgit/commands/new.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/stgit/commands/new.py b/stgit/commands/new.py
index 9fd51c3..158193e 100644
--- a/stgit/commands/new.py
+++ b/stgit/commands/new.py
@@ -67,7 +67,8 @@ def func(parser, options, args):
     cd = gitlib.CommitData(
         tree = stack.head.data.tree, parents = [stack.head], message = '',
         author = gitlib.Person.author(), committer = gitlib.Person.committer())
-    cd = common.update_commit_data(cd, options, allow_edit = True)
+    cd = common.update_commit_data(cd, options,
+                                   allow_edit = not options.save_template)
 
     if options.save_template:
         options.save_template(cd.message)

             reply	other threads:[~2009-07-31 10:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31  9:43 Gustav Hållberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-07-31  9:48 [StGit PATCH] stgit new: Do not open editor if --save-template was specified Gustav Hållberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090731094301.4336.5496.stgit@lux.e.vtech \
    --to=gustav@virtutech.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.