I'd like to run a function before magit runs git, and another one after magit runs git. I see
magit-pre-start-git-hook but I don't see any post-finish-git hook. How can I run commands before and after magit runs git?
Magit runs git a lot. Doing something every time that happens probably isn't a good idea. What do you want to accomplish?
That being said you can make Magit do something before running
git by advising all or some of the functions that run
git. I strongly recommend you only advice some of these functions or even just the commands that you actually want to do something before running
git. I cannot tell you which functions you have to advice because you didn't say what you want to accomplish.
To find all functions that run
git grep for