Add function to magit-mode-hook