threads / discuss / 35696

No local cloning for insteadOf URLs

Subject: No local cloning for insteadOf URLs

## tl;dr

One message between Jan 20, 2014 and Jan 20, 2014.

replies: 0people: 1as markdown or json

Hannes Mezger· Jan 20, 2014, 17:06 UTC · lore
Hi there,

on Linux I'm using the config option url.[].insteadOf feature to clone certain (very big) submodules from a local mirror instead of from remote. The configuration is something like

[url "/home/sampleuser/mirrors/bigrepo.git"]
    insteadOf = git@remotehost:bigrepo.git
Cloning this repo with
    git clone git@remotehost:bigrepo.git
works fine, it is cloning from my local repo instead of from the remote one.
But: I was expecting the 'git clone' call to take into account that it
is cloning a local repository and create hard links to the packs of my
local mirror repository, but instead it copies the whole repo just as it
was a remote repository. This should get fixed, this 'git clone' call
should detect that it is cloning a local repository and create hard
links to the *.pack files.
When cloning the local mirror directly with
    git clone /home/sampleuser/mirrors/bigrepo.git
'git clone' automatically creates hard links to the local mirrors *.pack
files.
Cheers,
Hannes

← back to recent threads