From: Junio C Hamano Date: Tue, 6 Oct 2020 20:13:56 +0000 (-0700) Subject: Meta/amlook: --squash trims the amlog notes tree X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ebf47c127a6b0d941c591dbca01209e84c12ec6;p=thirdparty%2Fgit.git Meta/amlook: --squash trims the amlog notes tree --- diff --git a/amlook b/amlook 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