~ecs/tm

ref: 95cb618f450695312ff6849e7c6e86709e985ae9 tm/tm-object-type -rwxr-xr-x 158 bytes
95cb618fEmber Sawady init: use commit instead of commit-tree 1 year, 10 months ago
                                                                                
1
2
3
4
5
6
7
#!/bin/sh

. "$(dirname -- "$0")/lib.sh"
[ $# -eq 1 ] || abort "usage: tm object-type <ref>"

ref="$(tm resolve-ref "$1")" || exit 1
tm cat "$ref" | head -n1