Skip to content

Instantly share code, notes, and snippets.

@ekazakov
Forked from garybernhardt/gist:b1a8cc6eacbfa9ea8100
Last active August 29, 2015 14:09

Revisions

  1. ekazakov revised this gist Nov 19, 2014. No changes.
  2. @garybernhardt garybernhardt revised this gist Nov 11, 2014. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,5 @@
    # aren't errors. If it prints "OK" at the end, your repos are all valid.

    # Please leave a comment here saying whether the command succeeded or not (even
    # if it said "OK"!) If it failed, please paste the bottom of the error,
    # starting with the last "git fsck" command, and also indicate what OS and file
    # system you run.
    # if it said "OK"!). Also name your OS and file system. If it failed, please
    # paste the bottom of the error, starting with the last "git fsck" command.
  3. @garybernhardt garybernhardt revised this gist Nov 11, 2014. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -2,13 +2,16 @@

    # cd to the directory containing your project repositories and run the command
    # below. (It's long; make sure you get it all.) It finds all of your git repos
    # and runs paranoid fscks in them.
    # and runs paranoid fscks in them to check their integrity.

    (set -e && find . -type d -and -iname '.git' | while read p; do (cd "$(dirname "$p")" && (set -x && git fsck --full --strict)); done) && echo "OK"

    # I have 81 git repos in my ~/proj directory and had no errors.

    # Please leave a comment here saying whether errors were found (if not, it will
    # say "OK!" at the end). If it failed, please paste the bottom of the error,
    # You might get messages about dangling commits, dangling blobs, etc. Those
    # aren't errors. If it prints "OK" at the end, your repos are all valid.

    # Please leave a comment here saying whether the command succeeded or not (even
    # if it said "OK"!) If it failed, please paste the bottom of the error,
    # starting with the last "git fsck" command, and also indicate what OS and file
    # system you run.
  4. @garybernhardt garybernhardt revised this gist Nov 11, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    # Has your OS/FS/disk lost your data?

    # cd to the directory containing your project repositories and run the command
    # below. (It's long; make sure you get it all.)
    # below. (It's long; make sure you get it all.) It finds all of your git repos
    # and runs paranoid fscks in them.

    (set -e && find . -type d -and -iname '.git' | while read p; do (cd "$(dirname "$p")" && (set -x && git fsck --full --strict)); done) && echo "OK"

  5. @garybernhardt garybernhardt revised this gist Nov 11, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -8,5 +8,6 @@
    # I have 81 git repos in my ~/proj directory and had no errors.

    # Please leave a comment here saying whether errors were found (if not, it will
    # say "OK!" at the end). If it failed, please paste the relevant bits of the
    # error, along with which OS and file system you run.
    # say "OK!" at the end). If it failed, please paste the bottom of the error,
    # starting with the last "git fsck" command, and also indicate what OS and file
    # system you run.
  6. @garybernhardt garybernhardt revised this gist Nov 11, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -9,4 +9,4 @@

    # Please leave a comment here saying whether errors were found (if not, it will
    # say "OK!" at the end). If it failed, please paste the relevant bits of the
    # error.
    # error, along with which OS and file system you run.
  7. @garybernhardt garybernhardt created this gist Nov 11, 2014.
    12 changes: 12 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    # Has your OS/FS/disk lost your data?

    # cd to the directory containing your project repositories and run the command
    # below. (It's long; make sure you get it all.)

    (set -e && find . -type d -and -iname '.git' | while read p; do (cd "$(dirname "$p")" && (set -x && git fsck --full --strict)); done) && echo "OK"

    # I have 81 git repos in my ~/proj directory and had no errors.

    # Please leave a comment here saying whether errors were found (if not, it will
    # say "OK!" at the end). If it failed, please paste the relevant bits of the
    # error.