aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2021-06-12 14:43:39 -0600
committerTim Harder <radhermit@gmail.com>2021-06-12 14:45:41 -0600
commit4bc144d8cc71b6264491e4ea3d3b6363068a71f7 (patch)
treee9e3ae96697b02af16dd7d550628a76d09f58d8c /tests
parentbump version (diff)
downloadpkgdev-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.py4
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')