Decoding Git index file using C#

不想你离开。 提交于 2019-12-10 17:38:39

问题


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...

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:

  • In Git itself;
  • In libgit2 written on C;
  • In GitSharp ported to C# from 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!


回答1:


Take a look at Documentation/technical/index-format.txt in the git.git repository:

http://git.kernel.org/?p=git/git.git;a=blob;f=Documentation/technical/index-format.txt;hb=HEAD



来源:https://stackoverflow.com/questions/8366963/decoding-git-index-file-using-c-sharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!