Fail if the start or end commit are missing and retry finding the previous tag by fetching all tags if they are missing. This should fix CI on the current Homebrew/brew `master` branch. Closes #2404.
module_function