Re: [PATCH 1/1] reset: fix reset when using the sparse-checkout feature.

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

 



Torsten Bögershausen <tboegi@xxxxxx> writes:

>> +test_expect_success 'setup' '
>> +	test_tick &&
>
> Do we need a test_tick here ?

As the test does not check against exact object names, and it does
not create commits, the order among which needs to be tiebroken by
using the committer timestamp, it is not strictly necessary, but I
do not think it would hurt, either.

>
>> +	echo "checkout file" >c &&
>> +	echo "modify file" >m &&
>> +	echo "delete file" >d &&
>> +	git add . &&
>> +	git commit -m "initial commit" &&
>> +	echo "added file" >a &&
>> +	echo "modification of a file" >m &&
>> +	git rm d &&
>> +	git add . &&
>> +	git commit -m "second commit" &&
>> +	git checkout -b endCommit
>> +'
>> +
>> +test_expect_success 'reset when there is a sparse-checkout' '
>> +	echo "/c" >.git/info/sparse-checkout &&
>> +	test_config core.sparsecheckout true &&
>> +	git checkout -b resetBranch &&
>> +	test_path_is_missing m &&
>> +	test_path_is_missing a &&
>> +	test_path_is_missing d &&
>> +	git reset HEAD~1 &&
>> +	test "checkout file" = "$(cat c)" &&
>> +	test "modification of a file" = "$(cat m)" &&
>> +	test "added file" = "$(cat a)" &&
>> +	test_path_is_missing d
>> +'
>> +




[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