repo.or.cz
/
git.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'nd/imap-send-typofix'
[git.git]
/
t
/
helper
/
test-index-version.c
blob
fcd10968cc10bdab8db146b8ba65080431e5ed24
1
#include
"test-tool.h"
2
#include
"cache.h"
3
4
int
cmd__index_version
(
int
argc
,
const char
**
argv
)
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
}