Re: [PATCH v8 38/44] refs.c: pack all refs before we start to rename a ref

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

 



On Wed, May 21, 2014 at 4:57 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Ronnie Sahlberg wrote:
>
>> This means that most loose refs will no longer be present after the rename
>
> Is this to handle the "git branch -m foo/bar foo" case or for some other
> purpose?

Yes. That is the main reason.

>
> [...]
>> --- a/t/t3200-branch.sh
>> +++ b/t/t3200-branch.sh
>> @@ -289,7 +289,7 @@ test_expect_success 'renaming a symref is not allowed' '
>>       git symbolic-ref refs/heads/master2 refs/heads/master &&
>>       test_must_fail git branch -m master2 master3 &&
>>       git symbolic-ref refs/heads/master2 &&
>> -     test_path_is_file .git/refs/heads/master &&
>> +     test_path_is_missing .git/refs/heads/master &&
>>       test_path_is_missing .git/refs/heads/master3
>
> It's kind of silly that this test is mucking about in the .git directory
> at all.  Shouldn't the check be something like
>
>         git rev-parse --verify refs/heads/master &&
>         test_must_fail git symbolic-ref refs/heads/master3 &&
>         test_must_fail git rev-parse refs/heads/master3
>
> ?

Thanks. I updated the test with your change.

There is a whole bunch of tests that are like and access files directly..
Testing if a path exists or not, or checking that a reflog file
contains x number of lines. etc.

All these tests will be updated to not access the files directly once
I start mucking around with a TDB based refs backend.
--
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]