Skip to content
  • Jeff King's avatar
    index-pack: skip collision check when not in repository · 29401e15
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    You can run "git index-pack path/to/foo.pack" outside of a
    repository to generate an index file, or just to verify the
    contents. There's no point in doing a collision check, since
    we obviously do not have any objects to collide with.
    
    The current code will blindly look in .git/objects based on
    the result of setup_git_env(). That effectively gives us the
    right answer (since we won't find any objects), but it's a
    waste of time, and it conflicts with our desire to
    eventually get rid of the "fallback to .git" behavior of
    setup_git_env().
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    29401e15