Skip to content

Commit cd20e0e

Browse files
author
Edward Thomson
committed
Handle "dangling" blobs and "unreachable" blobs
1 parent 75e9be5 commit cd20e0e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

git-recover

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ function find_unreachable() {
9696

9797
if [ $DO_FULL == 1 ]; then FULLNESS="--full"; fi
9898

99-
BLOBS=($(git fsck --unreachable --no-reflogs \
100-
"${FULLNESS}" --no-progress | sed -ne 's/^unreachable blob //p'))
99+
BLOBS=($(git fsck --unreachable --no-reflogs "${FULLNESS}" \
100+
--no-progress 2>/dev/null | \
101+
sed -E -ne 's/^unreachable blob |dangling blob //p'))
101102
}
102103

103104
function read_one_file {

0 commit comments

Comments
 (0)