git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [StGit PATCH] stgit new: Do not open editor if --save-template was specified
@ 2009-07-31  9:43 Gustav Hållberg
  0 siblings, 0 replies; 2+ messages in thread
From: Gustav Hållberg @ 2009-07-31  9:43 UTC (permalink / raw)
  To: git

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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [StGit PATCH] stgit new: Do not open editor if --save-template was specified
@ 2009-07-31  9:48 Gustav Hållberg
  0 siblings, 0 replies; 2+ messages in thread
From: Gustav Hållberg @ 2009-07-31  9:48 UTC (permalink / raw)
  To: git

Fixes side-effect of e58f264a3e59a0887c7aaa1e3227cff108ac840d

I'm not sure this is the right way to fix the problem, but an editor
should not be opened if "--save-template" was specified to "stg new",
as it is used for 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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-31 10:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-31  9:43 [StGit PATCH] stgit new: Do not open editor if --save-template was specified Gustav Hållberg
  -- strict thread matches above, loose matches on Subject: below --
2009-07-31  9:48 Gustav Hållberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).