DVCS vs. Subversion brittleness (was Re: Moving to D)

Bruno Medeiros brunodomedeiros+spam at com.gmail
Fri Feb 11 05:05:27 PST 2011


On 09/02/2011 14:27, Michel Fortin wrote:
> On 2011-02-09 07:49:31 -0500, Bruno Medeiros
> <brunodomedeiros+spam at com.gmail> said:
>
>> On 04/02/2011 20:11, Michel Fortin wrote:
>>> On 2011-02-04 11:12:12 -0500, Bruno Medeiros
>>> <brunodomedeiros+spam at com.gmail> said:
>>>
>>>> Can Git really have an usable but incomplete local clone?
>>>
>>> Yes, it's called a shallow clone. See the --depth switch of git clone:
>>> <http://www.kernel.org/pub/software/scm/git/docs/git-clone.html>
>>
>> I was about to say "Cool!", but then I checked the doc on that link
>> and it says:
>> "A shallow repository has a number of limitations (you cannot clone or
>> fetch from it, nor push from nor into it), but is adequate if you are
>> only interested in the recent history of a large project with a long
>> history, and would want to send in fixes as patches. "
>> So it's actually not good for what I meant, since it is barely usable
>> (you cannot push from it). :(
>
> Actually, pushing from a shallow repository can work, but if your
> history is not deep enough it will be a problem when git tries determine
> the common ancestor. Be sure to have enough depth so that your history
> contains the common ancestor of all the branches you might want to
> merge, and also make sure the remote repository won't rewrite history
> beyond that point and you should be safe. At least, that's what I
> understand from:
> <http://git.661346.n2.nabble.com/pushing-from-a-shallow-repo-allowed-td2332252.html>
>
>

Interesting. But it still feels very much like a second-class 
functionality, not something they really have in mind to support well, 
at least not yet.

Ideally, if one wants to do push but the ancestor history is incomplete, 
the VCS would download from the central repository whatever 
revision/changeset information was missing.

Before someone says, oh but that defeats some of the purposes of a 
distributed VCS, like being able to work offline. I know, and I 
personally don't care that much, in fact I find this "benefit" of DVCS 
has been overvalued way out of proportion. Does anyone do any serious 
coding while being offline for an extended period of time? Some people 
mentioned coding on the move, with laptops, but seriously, even if I am 
connected to the Internet I cannot code with my laptop only, I need it 
connected to a monitor, as well as a mouse, (and preferably a keyboard 
as well).

-- 
Bruno Medeiros - Software Engineer


More information about the Digitalmars-d mailing list