verify-pack.con commit [PATCH] Avoid unnecessarily inflating and interpreting delta (c62266f)
   1#include "cache.h"
   2#include "pack.h"
   3
   4static 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
  12int 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}