mirror of
https://github.com/git/git.git
synced 2024-11-05 00:37:55 +01:00
de61cebde7
* jk/common-main-2.8: mingw: declare main()'s argv as const common-main: call git_setup_gettext() common-main: call restore_sigpipe_to_default() common-main: call sanitize_stdfds() common-main: call git_extract_argv0_path() add an extra level of indirection to main()
14 lines
268 B
C
14 lines
268 B
C
#include "cache.h"
|
|
|
|
int cmd_main(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;
|
|
}
|