ご質問に.../tarball/...
リンクより新しい.../archive/...
リンクを使用してください。一般的な形式は次のとおりです。だから、
https://github.com/<group_or_organization>/<repo>/archive/<refspec>.tar.gz
、例えば:
$ curl -L jttps://github.com/nativescript/docs/archive/production.tar.gz | tar tz
docs-production/
docs-production/.gitattributes
docs-production/.gitignore
docs-production/.gitmodules
docs-production/.vscode/
docs-production/.vscode/settings.json
docs-production/README.md
...
あなたが生成されたトップレベルのディレクトリ名は、あなたがコミットIDに変換するのではなく、を提供するものは何でも<refspec>
使用していることが分かります。同様に
:
$ curl -s -L https://github.com/nativescript/docs/archive/ErikEdits-css-annimations.tar.gz | tar tz
docs-ErikEdits-css-annimations/
docs-ErikEdits-css-annimations/.gitattributes
docs-ErikEdits-css-annimations/.gitignore
...
支店名の代わりに、あなたは他のgit
refspecsを使用することができます。たとえば、次のように
https://github.com/nativescript/docs/archive/HEAD^.tar.gz
または:
https://github.com/nativescript/docs/archive/v2.3.0-20-ged0d16f.tar.gz
しかし、これらの例では、基準はコミットIDに変換されます。
これはcurlとは関係がありません。curlはstdoutに書き込んでいるので、ファイル名では何もしません。 –