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

Junio C Hamano committed Oct 6, 2020 at 13:13 UTC 5ebf47c127a6b0d941c591dbca01209e84c12ec6
1 file changed +6
amlook
+6
@@ -121,6 +121,12 @@ elif test "$1" = "--gc"
121 then
122 shift
123 garbage_collect "$@"
124 +elif test "$1" == "--squash"
125 +then
126 + L=notes/amlog &&
127 + git notes --ref=$L prune &&
128 + C=$(echo amlog | git commit-tree refs/$L^{tree}) &&
129 + git update-ref refs/$L $C
130 else
131 for msg
132 do