Skip to content

Commit 3555d62

Browse files
committed
Add script git-all-objects
1 parent 772286a commit 3555d62

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

git-all-objects

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -e
3+
shopt -s nullglob extglob
4+
5+
cd "`git rev-parse --git-path objects`"
6+
7+
# packed objects
8+
for p in pack/pack-*([0-9a-f]).idx ; do
9+
git show-index < $p | cut -f 2 -d ' '
10+
done
11+
12+
# loose objects
13+
for o in [0-9a-f][0-9a-f]/*([0-9a-f]) ; do
14+
echo ${o/\/}
15+
done

0 commit comments

Comments
 (0)