From: Erick Mattos Date: Thu, 22 Jul 2010 00:32:01 GMT Subject: Re: [PATCH] t/: work around one-shot variable assignment with test_must_fail Message-ID: In-Reply-To: <7v1vawk50n.fsf@alter.siamese.dyndns.org> Hi, 2010/7/21 Junio C Hamano : > Brandon Casey writes: > >> No time to investigate, but here is an example patch and the >> results of running the affected tests.  Looks like reflog may >> be creating a reflog when it is not supposed to. > > Your later analysis is correct; "git reflog show " does not > complain when there is no reflog for , which might or might not be > a bug. I think is not a bug but almost one. > Because these tests are not about behaviour of "git reflog show" command, > let's do this for now. > > Thanks. > > -- >8 -- > Subject: tests: correct "does reflog exist" tests > > These two tests were not about how "git reflog show " exits when > there is no reflog, but were about whether "checkout" and "branch" create > or not create reflog when creating a new , update the tests to > check it in a more direct way, namely using "git rev-parse --verify". > > Also lose tests based on "test -f .git/logs/refs/heads/" from > nearby, to avoid exposing this particular implementation detail > unnecessarily. Quite pretty. Clean and optimized solution. Better this way. Regards