Merge branch 'js/misc-git-gui-stuff' of ../git-gui
[alt-git.git] / t / helper / test-index-version.c
blobf569f6b7eff87227f82dbe6390fd31fb970a5fca
1 #include "cache.h"
3 int cmd_main(int argc, const char **argv)
5 struct cache_header hdr;
6 int version;
8 memset(&hdr,0,sizeof(hdr));
9 if (read(0, &hdr, sizeof(hdr)) != sizeof(hdr))
10 return 0;
11 version = ntohl(hdr.hdr_version);
12 printf("%d\n", version);
13 return 0;