From: Junio C Hamano Date: Mon, 26 Sep 2016 22:11:53 GMT Subject: Re: [RFC PATCH v4] revision: new rev^-n shorthand for rev^n..rev Message-ID: In-Reply-To: <20160926204959.26007-1-vegard.nossum@oracle.com> Vegard Nossum writes: > +test_expect_success 'rev-parse merge^-0' ' > + test_must_fail git rev-parse merge^-0 > +' > + > +test_expect_success 'rev-parse merge^-3' ' > + test_must_fail git rev-parse merge^-3 > +' > + > +test_expect_success 'rev-parse merge^-^' ' > + test_must_fail git rev-parse merge^-^ > +' > + > +test_expect_success 'rev-list merge^-0' ' > + test_must_fail git rev-list merge^-0 > +' > + > +test_expect_success 'rev-list merge^-3' ' > + test_must_fail git rev-list merge^-3 > +' > + > +test_expect_success 'rev-list merge^-^' ' > + test_must_fail git rev-list merge^-^ > +' This seems to be testing failure cases fairly thoroughly, which is a good sign. One thing not tested is "merge^-1x" to ensure that no change mistakenly will break the strtoul() check you have to parse the parent number in the future, but other than that (and possibly reusing the set-up of an already existing test), I am fairly happy with the tests in this patch. Thanks.