Re: [PATCH 3/8] fetch: fix missing from-reference when fetching HEAD:foo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 4/19/2023 5:31 AM, Patrick Steinhardt wrote:
>  
> +test_expect_success 'fetch output with HEAD and --dry-run' '
> +	test_when_finished "rm -rf head" &&
> +	git clone . head &&
> +
> +	git -C head fetch --dry-run origin HEAD >actual 2>&1 &&
> +	cat >expect <<-EOF &&
> +	From $(test-tool path-utils real_path .)/.
> +	 * branch            HEAD       -> FETCH_HEAD
> +	EOF
> +	test_cmp expect actual &&
> +
> +	git -C head fetch --dry-run origin HEAD:foo >actual 2>&1 &&
> +	cat >expect <<-EOF &&
> +	From $(test-tool path-utils real_path .)/.
> +	 * [new ref]         HEAD       -> foo
> +	EOF
> +	test_cmp expect actual
> +'
> +

The test mentions HEAD and --dry-run, but the bug seems to exist
regardless of whether --dry-run is used. I understand the use of
--dry-run for testing fetch output so that you can repeatably run git
fetch and get the same results.

The tests here should probably also have a test that covers fetch
without --dry-run though.

Thanks,
Jake



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux