repo.or.cz
/
git
/
gitweb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Prepare git-rev-list for tracking tag objects too
[git/gitweb.git]
/
verify-pack.c
blob
3ae5ac1b4fd9440eb01d3a682375e4061355d6df
1
#include
"cache.h"
2
#include
"pack.h"
3
4
static int
verify_one_pack
(
char
*
arg
)
5
{
6
struct
packed_git
*
g
=
add_packed_git
(
arg
,
strlen
(
arg
));
7
if
(!
g
)
8
return
-
1
;
9
return
verify_pack
(
g
);
10
}
11
12
int
main
(
int
ac
,
char
**
av
)
13
{
14
int
errs
=
0
;
15
16
while
(
1
<
ac
) {
17
char
path
[
PATH_MAX
];
18
strcpy
(
path
,
av
[
1
]);
19
if
(
verify_one_pack
(
path
))
20
errs
++;
21
else
22
printf
(
"%s: OK
\n
"
,
av
[
1
]);
23
ac
--;
av
++;
24
}
25
return
!!
errs
;
26
}