grep '^M' was not returning anything. In general diff-index and ls-files are preferred to status --porcelain.