~sircmpwn/shit

ref: 221772b8f451e4b2db9d7eabf0c86f7691728191 shit/write-tree -rwxr-xr-x 192 bytes
221772b8Drew DeVault Remove excess mode parsing from ls-file, write-tree 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
#!/bin/sh -eu
SHIT_PATH=$(dirname "$0")
. $SHIT_PATH/common.sh

"$SHIT_PATH"/ls-files | while read -r mode sha path
do
	# TODO: subtrees
	printf "%s %s\0" $mode "$path"
	write_hex "$sha"
done