@@ -129,10 +129,10 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
129
129
/* variables to be filled by option parsing */
130
130
int pack_everything = 0 ;
131
131
int delete_redundant = 0 ;
132
- char * unpack_unreachable = NULL ;
133
- int window = 0 , window_memory = 0 ;
134
- int depth = 0 ;
135
- int max_pack_size = 0 ;
132
+ const char * unpack_unreachable = NULL ;
133
+ const char * window = NULL , * window_memory = NULL ;
134
+ const char * depth = NULL ;
135
+ const char * max_pack_size = NULL ;
136
136
int no_reuse_delta = 0 , no_reuse_object = 0 ;
137
137
int no_update_server_info = 0 ;
138
138
int quiet = 0 ;
@@ -157,13 +157,13 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
157
157
N_ ("pass --local to git-pack-objects" )),
158
158
OPT_STRING (0 , "unpack-unreachable" , & unpack_unreachable , N_ ("approxidate" ),
159
159
N_ ("with -A, do not loosen objects older than this" )),
160
- OPT_INTEGER (0 , "window" , & window ,
160
+ OPT_STRING (0 , "window" , & window , N_ ( "n" ) ,
161
161
N_ ("size of the window used for delta compression" )),
162
- OPT_INTEGER (0 , "window-memory" , & window_memory ,
162
+ OPT_STRING (0 , "window-memory" , & window_memory , N_ ( "bytes" ) ,
163
163
N_ ("same as the above, but limit memory size instead of entries count" )),
164
- OPT_INTEGER (0 , "depth" , & depth ,
164
+ OPT_STRING (0 , "depth" , & depth , N_ ( "n" ) ,
165
165
N_ ("limits the maximum delta depth" )),
166
- OPT_INTEGER (0 , "max-pack-size" , & max_pack_size ,
166
+ OPT_STRING (0 , "max-pack-size" , & max_pack_size , N_ ( "bytes" ) ,
167
167
N_ ("maximum size of each packfile" )),
168
168
OPT_END ()
169
169
};
@@ -185,13 +185,13 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
185
185
argv_array_push (& cmd_args , "--all" );
186
186
argv_array_push (& cmd_args , "--reflog" );
187
187
if (window )
188
- argv_array_pushf (& cmd_args , "--window=%u " , window );
188
+ argv_array_pushf (& cmd_args , "--window=%s " , window );
189
189
if (window_memory )
190
- argv_array_pushf (& cmd_args , "--window-memory=%u " , window_memory );
190
+ argv_array_pushf (& cmd_args , "--window-memory=%s " , window_memory );
191
191
if (depth )
192
- argv_array_pushf (& cmd_args , "--depth=%u " , depth );
192
+ argv_array_pushf (& cmd_args , "--depth=%s " , depth );
193
193
if (max_pack_size )
194
- argv_array_pushf (& cmd_args , "--max_pack_size=%u " , max_pack_size );
194
+ argv_array_pushf (& cmd_args , "--max-pack-size=%s " , max_pack_size );
195
195
if (no_reuse_delta )
196
196
argv_array_pushf (& cmd_args , "--no-reuse-delta" );
197
197
if (no_reuse_object )
0 commit comments