Re: [PATCH] t/: work around one-shot variable assignment with test_must_fail
Hi,
2010/7/21 Junio C Hamano <gitster@pobox.com>:
Show 9 quoted lines
> Brandon Casey <casey@nrlssc.navy.mil> 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 <branch>" does not
> complain when there is no reflog for <branch>, which might or might not be
> a bug.
I think is not a bug but almost one.
Show 16 quoted lines
> 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 <branch>" exits when
> there is no reflog, but were about whether "checkout" and "branch" create
> or not create reflog when creating a new <branch>, 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/<branch>" from
> nearby, to avoid exposing this particular implementation detail
> unnecessarily.
Quite pretty. Clean and optimized solution. Better this way.
Regards