Given two git commit hashes, how do you lookup the branch names of all associated merges in between those commits?

I'm trying to write a script to collect some statistics about which branches have been merged into a specified target branch between two given dates.

I know you can get a list of all branches merged into a target branch with a command like:

```
git branch --merged <target_branch>

```

but how do you limit it to a certain range of commits?