Meta/amlook: --squash trims the amlog notes tree

todo
Junio C Hamano 2020-10-06 13:13:56 -07:00
parent bd8c67ed85
commit 5ebf47c127
1 changed files with 6 additions and 0 deletions

6
amlook
View File

@ -121,6 +121,12 @@ elif test "$1" = "--gc"
then
shift
garbage_collect "$@"
elif test "$1" == "--squash"
then
L=notes/amlog &&
git notes --ref=$L prune &&
C=$(echo amlog | git commit-tree refs/$L^{tree}) &&
git update-ref refs/$L $C
else
for msg
do