* In addition to "foo.idx" we accept "foo.pack" and "foo";
* normalize these forms to "foo.idx" for add_packed_git().
*/
- if (has_extension(arg, len, ".pack")) {
+ if (has_extension(arg, ".pack")) {
strcpy(arg + len - 5, ".idx");
len--;
- } else if (!has_extension(arg, len, ".idx")) {
+ } else if (!has_extension(arg, ".idx")) {
if (len + 4 >= PATH_MAX)
return error("name too long: %s.idx", arg);
strcpy(arg + len, ".idx");
int main(int ac, char **av)
{
- int errs = 0;
+ int err = 0;
int verbose = 0;
int no_more_options = 0;
int nothing_done = 1;
}
else {
if (verify_one_pack(av[1], verbose))
- errs++;
+ err = 1;
nothing_done = 0;
}
ac--; av++;
if (nothing_done)
usage(verify_pack_usage);
- return !!errs;
+ return err;
}