A strange question here. I need to filter out some part of any commit message in a repo (it's a long hash automatically added after some migration). As I'm (and my team also) using tortoise git, I created a small wrapper over git which basically forwards everything to stdout except the hashes from the commit messages. My assumption was that tortoise git would eventually call git log. Indeed, my wrapper works ie. when I do git log I get:
TICKETID-xxx
commit message
instead of
TICKETID-xxx
commit message
LONG-HASH
However, when I configure my git wrapper into tortoise git I still see the original commit messages. I already excluded an issue with my wrapper by logging its activity.
When I select the "Show log" option from the tortoise git I see the following commands being invoked:
git.exe symbolic-ref HEAD
git.exe rev-parse --revs-only --end-of-options HEAD
git.exe rev-parse --revs-only HEAD
git.exe update-index --refresh
git.exe diff-index --cached --raw HEAD --numstat -C -M -z --
git.exe diff-index --raw HEAD --numstat -C50% -M50% -z --
git.exe ls-files -u -t -z
git.exe ls-files -d -z
git.exe ls-files --exclude-standard --full-name --others -z
So how exactly is tortoise git displaying the commit messages? One thing is certain, the commit information doesn't come from the stdout of git.exe otherwise I would see it in the log of my wrapper.
Not all functionality in TortoiseGit is implemented by shelling out to the Git executable. Instead, some of it relies on calling into libgit2 or a fork of the Git source code compiled as a DLL named tgit. It looks like the dialog shown with "Show log" uses the latter quite a bit.