Re: [PATCH] ref namespaces: tests
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 15, 2011, 19:37 UTC
- Message-ID
- <7vhb6n1gjd.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <7v1uxs3177.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
>> +test_expect_success 'pushing into a repository using a ref namespace' ' >> + ( >> + cd original && >> + git push pushee-namespaced master && >> + git ls-remote pushee-namespaced > actual && >> + printf "dc65a2e0f299dcc7efddbbe01641a28ee84329ba\trefs/heads/master\n" > expected && > > Could you avoid hardcoding the exact object names here? Your script knows > what object should appear at refs/heads/master at "pushee-namespaced" (as > you have pushed from the repository "original" you are in), so it may be > something like: > > printf "%s\trefs/heads/mater\n" $(git rev-parse master) >expect > > Same comment applies for all the other hardcoded object names.
Just FYI, I did a sample fix-up for earlier tests in this patch and pushed it out in 'pu'; hopefully it may save your time.
Thanks.