summaryrefslogtreecommitdiff
path: root/test/git/test_index.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-10-27 20:51:07 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-10-27 20:51:07 +0200
commit1b6b9510e0724bfcb4250f703ddf99d1e4020bbc (patch)
treecc59bebcb6cbc6a1a9210e4ff123f2a256105261 /test/git/test_index.py
parent2c0b92e40ece170b59bced0cea752904823e06e7 (diff)
downloadgitpython-1b6b9510e0724bfcb4250f703ddf99d1e4020bbc.tar.gz
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
Diffstat (limited to 'test/git/test_index.py')
-rw-r--r--test/git/test_index.py9
1 files changed, 9 insertions, 0 deletions
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