Merge branch 'md/sort-detached-head-first'