diff options
author | 2021-06-12 14:43:39 -0600 | |
---|---|---|
committer | 2021-06-12 14:45:41 -0600 | |
commit | 4bc144d8cc71b6264491e4ea3d3b6363068a71f7 (patch) | |
tree | e9e3ae96697b02af16dd7d550628a76d09f58d8c /tests | |
parent | bump version (diff) | |
download | pkgdev-4bc144d8cc71b6264491e4ea3d3b6363068a71f7.tar.gz pkgdev-4bc144d8cc71b6264491e4ea3d3b6363068a71f7.tar.bz2 pkgdev-4bc144d8cc71b6264491e4ea3d3b6363068a71f7.zip |
pkgdev commit: use `git diff-index` instead of `git diff`
To avoid config settings affecting output.
Note that this forces nonempty repo usage since the HEAD ref isn't valid
on newly initialized git repos, but this shouldn't be an issue in most
cases.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scripts/test_pkgdev_commit.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/scripts/test_pkgdev_commit.py b/tests/scripts/test_pkgdev_commit.py index db6f864..b692b53 100644 --- a/tests/scripts/test_pkgdev_commit.py +++ b/tests/scripts/test_pkgdev_commit.py @@ -170,7 +170,7 @@ class TestPkgdevCommit: self.args = ['pkgdev', 'commit'] + self.scan_args def test_empty_repo(self, capsys, repo, make_git_repo): - git_repo = make_git_repo(repo.location) + git_repo = make_git_repo(repo.location, commit=True) with patch('sys.argv', self.args), \ pytest.raises(SystemExit) as excinfo, \ chdir(git_repo.path): @@ -182,7 +182,7 @@ class TestPkgdevCommit: def test_git_message_opts(self, repo, make_git_repo, tmp_path): """Verify message-related options are passed through to `git commit`.""" - git_repo = make_git_repo(repo.location) + git_repo = make_git_repo(repo.location, commit=True) repo.create_ebuild('cat/pkg-0') git_repo.add_all('cat/pkg-0', commit=False) path = str(tmp_path / 'msg') |