Skip to content

Commit 5ebf47c

Browse files
committed
Meta/amlook: --squash trims the amlog notes tree
1 parent bd8c67e commit 5ebf47c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

amlook

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ elif test "$1" = "--gc"
121121
then
122122
shift
123123
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
124130
else
125131
for msg
126132
do

0 commit comments

Comments
 (0)