From 7a320abc52307b4d4010166bd899ac75024ec9a7 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 18 Nov 2010 09:20:15 +0100 Subject: commit: when creating a new commit and advancing the head, it will now write the ORIG_HEAD reference as well --- test/git/test_index.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/git/test_index.py') diff --git a/test/git/test_index.py b/test/git/test_index.py index b5600eeb..29a7404d 100644 --- a/test/git/test_index.py +++ b/test/git/test_index.py @@ -409,6 +409,7 @@ class TestIndex(TestBase): commit_message = "commit default head" new_commit = index.commit(commit_message, head=False) + assert cur_commit != new_commit assert new_commit.author.name == uname assert new_commit.author.email == umail assert new_commit.committer.name == uname @@ -421,6 +422,7 @@ class TestIndex(TestBase): # same index, no parents commit_message = "index without parents" commit_no_parents = index.commit(commit_message, parent_commits=list(), head=True) + assert SymbolicReference(rw_repo, 'ORIG_HEAD').commit == cur_commit assert commit_no_parents.message == commit_message assert len(commit_no_parents.parents) == 0 assert cur_head.commit == commit_no_parents -- cgit v1.2.1