Re: [PATCH 01/37] t3030: Add a testcase for resolvable rename/add conflict with symlinks

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

 



Am 9/20/2010 10:28, schrieb Elijah Newren:
> @@ -255,7 +259,16 @@ test_expect_success 'setup 8' '
>  	git mv a e &&
>  	git add e &&
>  	test_tick &&
> -	git commit -m "rename a->e"
> +	git commit -m "rename a->e" &&
> +	if test_have_prereq SYMLINKS
> +	then
> +		git checkout rename-ln &&
> +		git mv a e &&
> +		ln -s e a &&
> +		git add a e &&
> +		test_tick &&
> +		git commit -m "rename a->e, symlink a->e"
> +	fi
>  '

You don't need the SYMLINKS prerequisite anywhere. Write this without ln -s:

	git commit -m "rename a->e" &&
	git checkout rename-ln &&
	git mv a e &&
	sha1e=$(printf e | git hash-object -w --stdin) &&
	git update-index --add --cacheinfo 120000 $sha1e a &&
	test_tick &&
	git commit -m "rename a->e, symlink a->e"

and the new test case passes even when SYMLINKS are not available!

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]