Rewrite branch fetching.