Staging
v0.5.1
Revision 01977f46cb48e2894e335667eaabce274174ac5e authored by Junio C Hamano on 13 July 2015, 21:03:44 UTC, committed by Junio C Hamano on 13 July 2015, 21:04:30 UTC
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 799767c
Raw File
test-index-version.c
#include "cache.h"

int main(int argc, 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;
}
back to top