We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfe6497 commit 8dbce83Copy full SHA for 8dbce83
Extractor/extractor.sh
@@ -25,11 +25,11 @@ function traverse_tree() {
25
#Read blobs/tree information from root tree
26
git ls-tree $tree |
27
while read leaf; do
28
- type=$(echo $leaf | grep -oE "^\d+\s+\K\w{4}");
29
- hash=$(echo $leaf | grep -oE "^\d+\s+\w{4}\s+\K\w{40}");
30
- name=$(echo $leaf | grep -oE "^\d+\s+\w{4}\s+\w{40}\s+\K.*");
+ type=$(echo $leaf | awk -F' ' '{print $2}') #grep -oP "^\d+\s+\K\w{4}");
+ hash=$(echo $leaf | awk -F' ' '{print $3}') #grep -oP "^\d+\s+\w{4}\s+\K\w{40}");
+ name=$(echo $leaf | awk '{$1=$2=$3=""; print substr($0,4)}') #grep -oP "^\d+\s+\w{4}\s+\w{40}\s+\K.*");
31
32
- # Get the blob data
+ # Get the blob data
33
git cat-file -e $hash;
34
#Ignore invalid git objects (e.g. ones that are missing)
35
if [ $? -ne 0 ]; then
0 commit comments