diff options
Diffstat (limited to 'git/test')
-rw-r--r-- | git/test/db/base.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/git/test/db/base.py b/git/test/db/base.py index b0bc76f9..5291ba03 100644 --- a/git/test/db/base.py +++ b/git/test/db/base.py @@ -584,8 +584,15 @@ class RepoBase(TestDBBase): assert rev_parse(refspec+":CHANGES").type == 'blob' #END operate on non-detached head - # the last position - assert rev_parse('@{1}') != head.commit + # the most recent previous position of the currently checked out branch + + try: + assert rev_parse('@{1}') != head.commit + except IndexError: + # on new checkouts, there isn't even a single past branch position + # in the log + pass + #END handle fresh checkouts # position doesn't exist self.failUnlessRaises(IndexError, rev_parse, '@{10000}') |