Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Nov 7, 2011
  1. @pclouds @gitster

    fsck: print progress

    pclouds authored gitster committed
    fsck is usually a long process and it would be nice if it prints
    progress from time to time.
    
    Progress meter is not printed when --verbose is given because
    --verbose prints a lot, there's no need for "alive" indicator.
    Progress meter may provide "% complete" information but it would
    be lost anyway in the flood of text.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @pclouds @gitster

    fsck: avoid reading every object twice

    pclouds authored gitster committed
    During verify_pack() all objects are read for SHA-1 check. Then
    fsck_sha1() is called on every object, which read the object again
    (fsck_sha1 -> parse_object -> read_sha1_file).
    
    Avoid reading an object twice, do fsck_sha1 while we have an object
    uncompressed data in verify_pack.
    
    On git.git, with this patch I got:
    
    $ /usr/bin/time ./git fsck >/dev/null
    98.97user 0.90system 1:40.01elapsed 99%CPU (0avgtext+0avgdata 616624maxresident)k
    0inputs+0outputs (0major+194186minor)pagefaults 0swaps
    
    Without it:
    
    $ /usr/bin/time ./git fsck >/dev/null
    231.23user 2.35system 3:53.82elapsed 99%CPU (0avgtext+0avgdata 636688maxresident)k
    0inputs+0outputs (0major+461629minor)pagefaults 0swaps
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  3. @pclouds @gitster

    verify_packfile(): check as many object as possible in a pack

    pclouds authored gitster committed
    verify_packfile() checks for whole pack integerity first, then each
    object individually. Once we get past whole pack check, we can
    identify all objects in the pack. If there's an error with one object,
    we should continue to check the next objects to salvage as many
    objects as possible instead of stopping the process.
    
    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.