Use magit-git-lines instead of magit-git-output