git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Jeff King
Message 8 of 8 in “ref namespaces: tests”
  1. ref namespaces: testsJosh Triplett, Jul 14, 2011
  2. Junio C HamanoJul 14, 2011
  3. Josh TriplettJul 15, 2011
  4. [PATCHv2] ref namespaces: testsJosh Triplett, Jul 15, 2011
  5. [PATCHv3] ref namespaces: testsJosh Triplett, Jul 21, 2011
  6. Junio C HamanoJul 21, 2011
  7. Jeff KingJul 22, 2011
  8. Junio C HamanoJul 15, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.