From: Junio C Hamano Date: Fri, 15 Jul 2011 19:37:42 GMT Subject: Re: [PATCH] ref namespaces: tests Message-ID: <7vhb6n1gjd.fsf@alter.siamese.dyndns.org> In-Reply-To: <7v1uxs3177.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: >> +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.