- #! /bin/bash
- [[ $# -ne 1 ]] && echo "Usage: $0 SHA1SUM
- Lists sha1 information for objects contained in tree associated with SHA1SUM." && exit 1
- sha=$1
- [[ ! -f "$(sgit-loc $sha)" ]] && echo "No object is associated with sha1sum $sha." && exit 1
- [[ "x$(sgit-type $sha)" != "xtree" ]] && echo "Object with sha1sum $sha is not a tree." && exit 1
- sgit-cat $sha | tail --lines=+3 | cut -c1-20 | xxd -p -c21 | cut -c1-40
|