On Tue, May 7, 2013 at 10:59 PM, Junio C Hamano <[email protected]> wrote:
>>       if (args->depth > 0) {
>> +             struct stat st;
>> +             if (!fstat(shallow_lock.fd, &st) &&
>> +                 st.st_size == 0) {
>> +                     unlink_or_warn(git_path("shallow"));
>
> Are we unlinking the right file here?

Yes we are. when st.st_size is 0, the new shallow file is empty (i.e.
--unshallow), so we want to remove the old file. I should check
"!*alternate_shallow_file" here instead of based on st.st_size.
--
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to