2011-11-06 48 views
1

以下頁面提供短哈希89b734fd24提交對應標籤1.1.1https://github.com/jezdez/django_compressor/tree/1.1.1意外在一個壓縮包提交散在GitHub上

然而,在下面的壓縮包打包目錄稱爲jezdez-django_compressor-a66ab32https://nodeload.github.com/jezdez/django_compressor/tarball/1.1.1

通常,tarball中的短散列與提交散列匹配。 a66ab32從哪裏來?

更新:似乎來自GitHub的人剛剛在tarball中爲標記修復了散列,現在它是一致的。至少,我不能再現這個問題了。

UPDATE2:與https://github.com/stefanfoulis/cmsplugin-filer/tree/0.8.0出現相同的問題,壓縮包包含stefanfoulis-cmsplugin-filer-f6c10c2(標籤散列),而提交散列3bbbd37

UPDATE3:

  • [22時16]取決於如果標籤是一種輕質標籤或不
  • [22:16]輕量級標籤指向提交,實際標籤有自己的sha/message/tagger與之相關聯
  • [22:17]另請參閱:http://progit.org/book/ch2-6.html

回答

4

散列是標籤的對象標識。很難找到這些標籤的對象ID,但這是可能的。

$ git show-ref 1.1.1 
a66ab32181a6597ec946423f2aecbde9ed113e93 refs/tags/1.1.1 

$ git rev-parse 1.1.1 
a66ab32181a6597ec946423f2aecbde9ed113e93 

$ git show --pretty=raw 1.1.1 
tag 1.1.1 
Tagger: Jannis Leidel <[email protected]> 

1.1.1 yeah! 

commit 89b734fd24c9e172949cac6df29ea591a95f8aa3 
tree 042332aaba8b325f9a65697de5c340919cc42f72 
parent f226274e4e90c58956753bcd33a406a59e1b419a 
parent d683e30dd146bb6db62934a6f561aea27fd84a06 
author Jannis Leidel <[email protected]> 1320241044 +0100 
committer Jannis Leidel <[email protected]> 1320241044 +0100 

    Merge branch 'release/1.1.1' 

該壓縮包含提交的sha,該目錄具有實際標記對象的sha。

+1

水管命令的細分 – sehe

1

如果不先考慮這一點,我會說它可能是一個帶註釋的標記,也可能是簽名的。

這些是單獨的對象,因此在git對象數據庫中有單獨的對象ID。標籤引用了一個提交ID。 (尋找到你現在連接回購)

編輯這裏發生了什麼:

git show a66ab32

tag 1.1.1 
Tagger: Jannis Leidel <[email protected]> 
Date: Wed Nov 2 14:37:24 2011 +0100 

1.1.1 yeah! 

commit 89b734fd24c9e172949cac6df29ea591a95f8aa3 
Merge: f226274 d683e30 
Author: Jannis Leidel <[email protected]> 
Date: Wed Nov 2 14:37:24 2011 +0100 

    Merge branch 'release/1.1.1' 

所以你可以看到a66ab32名稱的標籤,89b734fd24c9e17名稱相應承諾

+0

你能指導我如何在tarball中找到'a66ab32'嗎? – Andrei

+1

@Andrei:我已經展示過了? 'git show a66ab32' – sehe

+0

對,我應該在刷新頁面之前評論:) – Andrei