repo.or.cz
/
alt-git.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
revision: add missing include
[alt-git.git]
/
test-index-version.c
blob
05d4699c4a6cf32b2b6291e275dafa2744fe19d6
1
#include
"cache.h"
2
3
int
main
(
int
argc
,
char
**
argv
)
4
{
5
struct
cache_header hdr
;
6
int
version
;
7
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
;
14
}