merge(third_party/git): Merge squashed git subtree at v2.23.0
Merge commit '1b593e1ea4' as 'third_party/git'
This commit is contained in:
commit
7ef0d62730
3629 changed files with 1139935 additions and 0 deletions
15
third_party/git/t/helper/test-index-version.c
vendored
Normal file
15
third_party/git/t/helper/test-index-version.c
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
|
||||
int cmd__index_version(int argc, const char **argv)
|
||||
{
|
||||
struct cache_header hdr;
|
||||
int version;
|
||||
|
||||
memset(&hdr,0,sizeof(hdr));
|
||||
if (read(0, &hdr, sizeof(hdr)) != sizeof(hdr))
|
||||
return 0;
|
||||
version = ntohl(hdr.hdr_version);
|
||||
printf("%d\n", version);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue