当我从github下载zip文件时,文件名末尾的十六进制字符串是什么? [英] When I download a zip from github, what is the hex string at the end of the file name represent?

查看:759
本文介绍了当我从github下载zip文件时,文件名末尾的十六进制字符串是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我转到 https://github.com/wesm/pandas 并单击下载按钮以下载zip(或tar)档案库,我得到的档案文件名是:

  wesm-pandas-0.3。 0-93-g1d40e65.zip 

我可以看到 wesm-pandas 表示项目名称, 0.3.0 表示项目版本。



code> 93 表示该分支的提交数量



g1d40e65 表示?

解决方案

在用户名和项目之后,文件名从以下输出中获得:

  git describe --always 

手册页中的示例:


[torvalds @ g5 git] $ git描述父



v1.0.4-14-g2414721

即我的母公司
分支的当前头部基于v1.0.4,但由于
有几个提交,
describe增加了
的数目额外的提交(14)和一个
缩写为提交
本身(2414721)的对象名称。


http://www.kernel .org / pub / software / scm / git / docs / git-describe.html

所以在你的情况中,93是自0.3 .0和g之后的十六进制是最近提交的sha1

If I go to https://github.com/wesm/pandas and click the "Download" button to download a zip (or tar) archive of the repository, the file name of the archive I get is:

wesm-pandas-0.3.0-93-g1d40e65.zip

I can see that wesm-pandas represents the project name, and 0.3.0 represents the project version.

Does 93 represent the number of commits on that branch?

What does g1d40e65 represent?

解决方案

After the username and the project, the filename is obtained from the output of:

git describe --always

Example from the man page:

[torvalds@g5 git]$ git describe parent

v1.0.4-14-g2414721

i.e. the current head of my "parent" branch is based on v1.0.4, but since it has a few commits on top of that, describe has added the number of additional commits ("14") and an abbreviated object name for the commit itself ("2414721") at the end.

http://www.kernel.org/pub/software/scm/git/docs/git-describe.html

So in your case, 93 is the number of commits since 0.3.0 and the hex after g is the sha1 of the latest commit

这篇关于当我从github下载zip文件时,文件名末尾的十六进制字符串是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆