From: Catalin Marinas Date: Sat, 8 Nov 2008 21:18:08 +0000 (+0000) Subject: Remove the --committer options X-Git-Tag: v0.15-rc1~102^2~5 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/53388a712669bc5db72030fb5fe7addb5da0716e Remove the --committer options 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 --- diff --git a/stgit/argparse.py b/stgit/argparse.py index 0adb8ff..0a5f66a 100644 --- a/stgit/argparse.py +++ b/stgit/argparse.py @@ -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() diff --git a/stgit/commands/edit.py b/stgit/commands/edit.py index 4904f68..ed785aa 100644 --- a/stgit/commands/edit.py +++ b/stgit/commands/edit.py @@ -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: diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py index 3eb29ba..97a6a09 100644 --- a/stgit/commands/imprt.py +++ b/stgit/commands/imprt.py @@ -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') diff --git a/stgit/commands/new.py b/stgit/commands/new.py index 067882a..151cfe9 100644 --- a/stgit/commands/new.py +++ b/stgit/commands/new.py @@ -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: