We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f96058 commit 4298468Copy full SHA for 4298468
git/test/db/base.py
@@ -584,8 +584,15 @@ def test_rev_parse(self):
584
assert rev_parse(refspec+":CHANGES").type == 'blob'
585
#END operate on non-detached head
586
587
- # the last position
588
- assert rev_parse('@{1}') != head.commit
+ # the most recent previous position of the currently checked out branch
+
589
+ try:
590
+ assert rev_parse('@{1}') != head.commit
591
+ except IndexError:
592
+ # on new checkouts, there isn't even a single past branch position
593
+ # in the log
594
+ pass
595
+ #END handle fresh checkouts
596
597
# position doesn't exist
598
self.failUnlessRaises(IndexError, rev_parse, '@{10000}')
0 commit comments