• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

各コミットに割り当てられるSHA1は長いので、その頭数桁をabbreviated commit hash/commit checksumなどと呼びます。適当な長さで良いようです:ex. 7-8桁。

数桁って何桁やねん!と思って探したのですが、見つけられませんでした。そういえば昔何かのlibraryの作者にバグ報告したときに、githubのコミットSHA1の頭五桁を送ってくれって言われたことがありました。ということで適当でいいみたいですね。この適当さ加減が良い。そしてそういう風にも使えるのですね。

このhashはtag設定時等に指定できます:

   1  % git tag -a v1.1 0d86f96 -m "version 1.1"
   2  % git show fb47ddb2

Pretty formatsのformatに記述されていました: abbreviated commit hash

%h: abbreviated commit hash
http://www.kernel.org/pub/software/scm/git/docs/git-show.html#_pretty_formats

learn.githubでタグ時の説明に:commit checksum

And I forgot to tag the project at ‘v1.2’, which was at the ‘updated rakefile’ commit, I can add it after the fact. To tag that commit, you can just specify the commit checksum (or part of it) at the end of the command.

$ git tag -a v1.2 9fceb02
http://learn.github.com/p/tagging.html#tagging_later

posted by Png satoko on Fri 13 Mar 2009 at 12:25 with 2 comments

Comments:

Face gitster about 15 years ago.

数桁って何桁やねん!

答えは、最低四桁、でもリポジトリ内でオブジェクトを一意に同定できるに十分なケタ数がないといけません。

Png satoko about 15 years ago.

ぉぉ了解です。ありがとうございます〜 モヤが消えました!

or Preview
Social Bookmarks
  • Delicious
  • B_entry1357
  • Clip_16_12_w
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ