From 1b6b9510e0724bfcb4250f703ddf99d1e4020bbc Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 27 Oct 2010 20:51:07 +0200 Subject: Fixed bug that would cause the author's email to be a generic default one, instead of the existing and valid. The rest of the ConfigParser handling is correct, as it reads all configuration files available to git see http://github.com/Byron/GitPython/issues#issue/1 --- test/git/test_index.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/git/test_index.py') diff --git a/test/git/test_index.py b/test/git/test_index.py index 13d2c10d..29ad2b5c 100644 --- a/test/git/test_index.py +++ b/test/git/test_index.py @@ -353,6 +353,11 @@ class TestIndex(TestBase): num_entries = len(index.entries) cur_head = rw_repo.head + uname = "Some Developer" + umail = "sd@company.com" + rw_repo.config_writer().set_value("user", "name", uname) + rw_repo.config_writer().set_value("user", "email", umail) + # remove all of the files, provide a wild mix of paths, BaseIndexEntries, # IndexEntries def mixed_iterator(): @@ -404,6 +409,10 @@ class TestIndex(TestBase): commit_message = "commit default head" new_commit = index.commit(commit_message, head=False) + assert new_commit.author.name == uname + assert new_commit.author.email == umail + assert new_commit.committer.name == uname + assert new_commit.committer.email == umail assert new_commit.message == commit_message assert new_commit.parents[0] == cur_commit assert len(new_commit.parents) == 1 -- cgit v1.2.1