Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
fenollp
· 11y ago · 0 comments
Stupidly inefficient. `git ls-remote --heads --tags ‹URL›`
Comments
[–]
oxplot
11y ago
That 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
OP
11y ago
You 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 ago
You 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.
[–]
fenollp
OP
11y ago
Use git-archive or curl: gzipped source code is always smaller than a full versioned repo…