diff options
author | Michael Schubert <schu@schu.io> | 2012-09-27 16:59:43 +0400 |
---|---|---|
committer | Michael Schubert <schu@schu.io> | 2012-09-27 21:12:01 +0400 |
commit | 8060cdc93cc185e9a71c1aa17091dc0a5ab14457 (patch) | |
tree | 27fc40b6f311f76f201218a7997c01f773602294 /tests-clar/revwalk | |
parent | 5942bd18bf557cc70873009c4303a421c83f0129 (diff) |
revwalk: fix off-by-one error
Fixes #921.
Diffstat (limited to 'tests-clar/revwalk')
-rw-r--r-- | tests-clar/revwalk/mergebase.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests-clar/revwalk/mergebase.c b/tests-clar/revwalk/mergebase.c index a210c1ff2..84349010a 100644 --- a/tests-clar/revwalk/mergebase.c +++ b/tests-clar/revwalk/mergebase.c @@ -67,6 +67,15 @@ void test_revwalk_mergebase__no_common_ancestor_returns_ENOTFOUND(void) cl_assert_equal_i(GIT_ENOTFOUND, error); } +void test_revwalk_mergebase__no_off_by_one_missing(void) +{ + git_oid result, one, two; + + cl_git_pass(git_oid_fromstr(&one, "1a443023183e3f2bfbef8ac923cd81c1018a18fd")); + cl_git_pass(git_oid_fromstr(&two, "9f13f7d0a9402c681f91dc590cf7b5470e6a77d2")); + cl_git_pass(git_merge_base(&result, _repo, &one, &two)); +} + static void assert_mergebase_many(const char *expected_sha, int count, ...) { va_list ap; |