使用C#解码Git的索引文件 [英] Decoding Git index file using C#
问题描述
有大约Git的索引文件的内部结构的任何文件?从不同的书,我知道这是二进制文件,它包含暂存文件的SHA值,我知道混帐'管道'命令有助于揭示内容编制索引...
Is there any documentation about internal structure of Git index file? From various book I know it's binary and it contains SHAs of staged files, I know about Git 'plumbing' commands helping to reveal index content...
但如何读?使用C#,例如通过自己的指数
But how about read index by myself using C#, for example?
我知道有这个功能的几种实现,所以这是可以研究的代码:
I know that there several implementations of this feature, so it's possible to study the code:
- 在Git的本身;
- 在编写基于C libgit2;
- 在GitSharp移植到C#从Java。
和所有这些选项有点复杂,因为需要破解周围的其他的代码。我宁愿使用的数据格式的解释从无到有发展。如果这是可能的原因。
And all these options a bit complex, because need to hack around other's code. I would prefer to develop from scratch using data format explanation. If it's possible of cause.
会感谢你的帮助非常感谢!
Would appreciate your help very much!
推荐答案
看看文档/技术/索引format.txt
在 git.git
仓库:
的 http://git.kernel.org/?p=git/git.git;a=blob;f=Documentation/technical/index-format.txt;hb=HEAD
这篇关于使用C#解码Git的索引文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!