]> git.ipfire.org Git - thirdparty/git.git/blame - t/helper/test-index-version.c
Merge branch 'ob/t9001-indent-fix'
[thirdparty/git.git] / t / helper / test-index-version.c
CommitLineData
cc6f663d 1#include "test-tool.h"
08c46a49 2#include "read-cache-ll.h"
dbd57f99 3
126e3b3d 4int cmd__index_version(int argc UNUSED, const char **argv UNUSED)
dbd57f99
NTND
5{
6 struct cache_header hdr;
7 int version;
8
9 memset(&hdr,0,sizeof(hdr));
10 if (read(0, &hdr, sizeof(hdr)) != sizeof(hdr))
11 return 0;
12 version = ntohl(hdr.hdr_version);
13 printf("%d\n", version);
14 return 0;
15}