objects/ 中的目录名称代表什么?

What the name of directory in objects/ stand for?

我想这是访问 git 中特定文件的快速方法。但我不知道目录名称 06, 0d, 17, 27, 29, 2e 代表什么以及为什么目录名称是 06 .

objects
   ├── 06
   │   └── d378aef5b28791df7c6b5a58c866d8569cac87
   ├── 0d
   │   └── 25470613db871791afd43ae724cbbe367c30ef
   ├── 17
   │   └── af6db51eca422ab8629a40cb54b8e5d8da2b3f
   ├── 27
   │   └── d749cd2a7e3d2b1e27080505e37b301f73108d
   ├── 29
   │   └── faabec2bc6b5a7b00a5d6d9ebc9f2a5daf3d5b
   ├── 2e
   │   └── e648b03e6b4bf45515a8eb3a3ab62400940fe2

来自 Git documentation,当 Git 散列对象时,上面的输出是一个 40 个字符的校验和 SHA-1 散列。 Git 使用该哈希的前两个字符作为子目录的名称,其余 38 个字符作为文件名。

If you again examine your objects directory, you can see that it now contains a file for that new content. This is how Git stores the content initially — as a single file per piece of content, named with the SHA-1 checksum of the content and its header. The subdirectory is named with the first 2 characters of the SHA-1, and the filename is the remaining 38 characters.