4 ms·
Stupidly inefficient. `git ls-remote --heads --tags ‹URL›`
by fenollp 11y ago
Stupidly inefficient. `git ls-remote --heads --tags ‹URL›`
- oxplot 11y agoThat only gives you the commit for the head of the branches. If there were multiple commits since you checked last, you'll miss some!
- fenollp 11y agoYou will miss some. But then you just make a diff on the commits' SHA and only then you clone the repo (or fetch an archive, which is quicker). You save a lot of time / bandwidth / space this way.
- oxplot 11y agoYou only delay saving time and bandwidth — you eventually have to clone the repo for any ops other than checking the head SHAs and unless the repo is rarely updated, the delay will be short.