The patch allows the 'refresh' command to accept files as arguments. Only
the local changes to the specified files will be considered for inclusion
in the patch to be refreshed.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
help = 'generate a new commit for the current patch'
help = 'generate a new commit for the current patch'
-usage = """%prog [options]
+usage = """%prog [options] [<files...>]
Include the latest tree changes in the current patch. This command
generates a new GIT commit object with the patch details, the previous
Include the latest tree changes in the current patch. This command
generates a new GIT commit object with the patch details, the previous
def func(parser, options, args):
def func(parser, options, args):
- if len(args) != 0:
- parser.error('incorrect number of arguments')
-
if config.has_option('stgit', 'autoresolved'):
autoresolved = config.get('stgit', 'autoresolved')
else:
if config.has_option('stgit', 'autoresolved'):
autoresolved = config.get('stgit', 'autoresolved')
else:
if autoresolved == 'yes':
resolved_all()
if autoresolved == 'yes':
resolved_all()
- crt_series.refresh_patch(message = options.message,
+ crt_series.refresh_patch(files = args,
+ message = options.message,
edit = options.edit,
show_patch = options.showpatch,
author_name = options.authname,
edit = options.edit,
show_patch = options.showpatch,
author_name = options.authname,
if os.path.exists(self.__base_file):
os.remove(self.__base_file)
if os.path.exists(self.__base_file):
os.remove(self.__base_file)
- def refresh_patch(self, message = None, edit = False, show_patch = False,
+ def refresh_patch(self, files = None, message = None, edit = False,
+ show_patch = False,
cache_update = True,
author_name = None, author_email = None,
author_date = None,
cache_update = True,
author_name = None, author_email = None,
author_date = None,
if not committer_email:
committer_email = patch.get_commemail()
if not committer_email:
committer_email = patch.get_commemail()
- commit_id = git.commit(message = descr, parents = [patch.get_bottom()],
+ commit_id = git.commit(files = files,
+ message = descr, parents = [patch.get_bottom()],
cache_update = cache_update,
allowempty = True,
author_name = author_name,
cache_update = cache_update,
allowempty = True,
author_name = author_name,