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
index dcae1f0407..e750129bc6 100755
--- a/amlook
+++ b/amlook
@@ -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