mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Make explicit argument for git commit -a
This commit is contained in:
parent
f9bf1a7004
commit
5665b94a5b
|
@ -717,7 +717,12 @@ def _create_main_file(dir_path, name=None, output=None):
|
|||
|
||||
|
||||
def _git_commit(
|
||||
env_or_script, repo_dir, message=None, args=None, allow_empty=False
|
||||
env_or_script,
|
||||
repo_dir,
|
||||
message=None,
|
||||
args=None,
|
||||
allow_empty=False,
|
||||
stage_modified=False,
|
||||
):
|
||||
"""
|
||||
Run git-commit.
|
||||
|
@ -736,6 +741,9 @@ def _git_commit(
|
|||
if allow_empty:
|
||||
args.append("--allow-empty")
|
||||
|
||||
if stage_modified:
|
||||
args.append("--all")
|
||||
|
||||
new_args = [
|
||||
'git', 'commit', '-q', '--author', 'pip <pypa-dev@googlegroups.com>',
|
||||
]
|
||||
|
@ -880,7 +888,7 @@ def _change_test_package_version(script, version_pkg_path):
|
|||
)
|
||||
# Pass -a to stage the change to the main file.
|
||||
_git_commit(
|
||||
script, version_pkg_path, message='messed version', args=['-a']
|
||||
script, version_pkg_path, message='messed version', stage_modified=True
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,9 @@ def _pull_in_submodule_changes_to_module(env, module_path, rel_path):
|
|||
submodule_path = module_path / rel_path
|
||||
env.run('git', 'pull', '-q', 'origin', 'master', cwd=submodule_path)
|
||||
# Pass -a to stage the submodule changes that were just pulled in.
|
||||
_git_commit(env, module_path, message='submodule change', args=['-a'])
|
||||
_git_commit(
|
||||
env, module_path, message='submodule change', stage_modified=True
|
||||
)
|
||||
|
||||
|
||||
def _create_test_package_with_submodule(env, rel_path):
|
||||
|
|
Loading…
Reference in a new issue