13
13
14
14
static const char * const builtin_bundle_usage [] = {
15
15
N_ ("git bundle create [<options>] <file> <git-rev-list args>" ),
16
- N_ ("git bundle verify <file>" ),
16
+ N_ ("git bundle verify [<options>] <file>" ),
17
17
N_ ("git bundle list-heads <file> [<refname>...]" ),
18
18
N_ ("git bundle unbundle <file> [<refname>...]" ),
19
19
NULL
@@ -25,7 +25,7 @@ static const char * const builtin_bundle_create_usage[] = {
25
25
};
26
26
27
27
static const char * const builtin_bundle_verify_usage [] = {
28
- N_ ("git bundle verify <file>" ),
28
+ N_ ("git bundle verify [<options>] <file>" ),
29
29
NULL
30
30
};
31
31
@@ -97,8 +97,11 @@ static int cmd_bundle_create(int argc, const char **argv, const char *prefix) {
97
97
static int cmd_bundle_verify (int argc , const char * * argv , const char * prefix ) {
98
98
struct bundle_header header ;
99
99
int bundle_fd = -1 ;
100
+ int quiet = 0 ;
100
101
101
102
struct option options [] = {
103
+ OPT_BOOL ('q' , "quiet" , & quiet ,
104
+ N_ ("do not show bundle details" )),
102
105
OPT_END ()
103
106
};
104
107
const char * bundle_file ;
@@ -111,7 +114,7 @@ static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) {
111
114
if ((bundle_fd = read_bundle_header (bundle_file , & header )) < 0 )
112
115
return 1 ;
113
116
close (bundle_fd );
114
- if (verify_bundle (the_repository , & header , 1 ))
117
+ if (verify_bundle (the_repository , & header , ! quiet ))
115
118
return 1 ;
116
119
fprintf (stderr , _ ("%s is okay\n" ), bundle_file );
117
120
return 0 ;
0 commit comments