Remove the --committer options
authorCatalin Marinas <catalin.marinas@gmail.com>
Sat, 8 Nov 2008 21:18:08 +0000 (21:18 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Sat, 8 Nov 2008 21:18:08 +0000 (21:18 +0000)
As per bug #11977, these options should not be used directly. People
wanting a different committer should set the corresponding Git
environment variables.

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

index 0adb8ff..0a5f66a 100644 (file)
@@ -220,9 +220,6 @@ def _person_opts(person, short):
 def author_options():
     return _person_opts('author', 'auth')
 
-def author_committer_options():
-    return _person_opts('author', 'auth') + _person_opts('committer', 'comm')
-
 class CompgenBase(object):
     def actions(self, var): return set()
     def words(self, var): return set()
index 4904f68..ed785aa 100644 (file)
@@ -63,7 +63,7 @@ options = [
         short = 'Invoke interactive editor'),
     ] + (argparse.sign_options() +
          argparse.message_options(save_template = True) +
-         argparse.author_committer_options() + argparse.diff_opts_option())
+         argparse.author_options() + argparse.diff_opts_option())
 
 directory = common.DirectoryHasRepositoryLib()
 
@@ -88,7 +88,7 @@ def func(parser, options, args):
 
     cd, failed_diff = edit.auto_edit_patch(
         stack.repository, cd, msg = options.message, contains_diff = True,
-        author = options.author, committer = options.committer,
+        author = options.author, committer = lambda p: p,
         sign_str = options.sign_str)
 
     if options.save_template:
index 3eb29ba..97a6a09 100644 (file)
@@ -77,10 +77,6 @@ options = [
         short = 'Use AUTHEMAIL as the author e-mail'),
     opt('--authdate',
         short = 'Use AUTHDATE as the author date'),
-    opt('--commname',
-        short = 'Use COMMNAME as the committer name'),
-    opt('--commemail',
-        short = 'Use COMMEMAIL as the committer e-mail'),
     ] + argparse.sign_options()
 
 directory = DirectoryHasRepository(log = True)
@@ -130,8 +126,6 @@ def __create_patch(filename, message, author_name, author_email,
     if not message:
         can_edit = False
 
-    committer_name = committer_email = None
-
     if options.author:
         options.authname, options.authemail = name_email(options.author)
 
@@ -142,17 +136,11 @@ def __create_patch(filename, message, author_name, author_email,
         author_email = options.authemail
     if options.authdate:
         author_date = options.authdate
-    if options.commname:
-        committer_name = options.commname
-    if options.commemail:
-        committer_email = options.commemail
 
     crt_series.new_patch(patch, message = message, can_edit = False,
                          author_name = author_name,
                          author_email = author_email,
-                         author_date = author_date,
-                         committer_name = committer_name,
-                         committer_email = committer_email)
+                         author_date = author_date)
 
     if not diff:
         out.warn('No diff found, creating empty patch')
index 067882a..151cfe9 100644 (file)
@@ -40,7 +40,7 @@ the patch, unless the '--message' flag already specified one. The
 editor."""
 
 args = []
-options = (argparse.author_committer_options()
+options = (argparse.author_options()
            + argparse.message_options(save_template = True)
            + argparse.sign_options())
 
@@ -72,9 +72,8 @@ def func(parser, options, args):
     if options.message != None:
         cd = cd.set_message(options.message)
 
-    # Modify author and committer data.
-    cd = (cd.set_author(options.author(cd.author))
-            .set_committer(options.committer(cd.committer)))
+    # Modify author data.
+    cd = cd.set_author(options.author(cd.author))
 
     # Add Signed-off-by: or similar.
     if options.sign_str != None: