Skip to contentSkip to conversation

Gitweb: Persistant download URLs for snapshots?

DISCUSSION Timo Sigurdsson 1 participant 1 message Jun 16, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

I hope this is the right place to ask this, but I wanted to know whether it is possible to have a persistant URL to obtain a snapshot of the latest master of a repository through Gitweb.

I set up a gitweb instance and it works nicely. I can click on the snapshot link to get a tgz archive of a specific commit hash to quickly receive or distribute files of a repository exposed by Gitweb. However, I have two problems with these links:

1) The link seems to depend on a commit hash. I haven't found a shorter or persitant link that would e.g. always give me the latest master snapshot.

2) Another issue which is actually more problematic: The links only seem to work interactively in my desktop browser. If I right click the link "snapshot", copy the URL and then try to download that link from another (headless) machine using wget, I end up getting a html file instead of a tgz archive.

Is it possible to generate such links that conssitantly work for the latest commit of a repository and that work non-interactively from a command line? Am I doing something wrong (well aside fromt he possibility that I'm trying to use gitweb for something which it might not have been designed for...)?

Thank you!

Kind regards,

Timo