title: Why isn't 'git bisect' branch aware?
body: <p>I'm trying to find the source of a bug that's come up since a commit in the past day on a long lived branch (which will be released much much later) called <strong>feature-x</strong>.</p>
  
  <p>There's a bug though. I find behavior that I don't expect from my script which might have been introduced in any of the commit's up till now, specifically because features of master are used heavily in feature-x, but less so on Master itself.</p>
  
  <p>To test this behavior, I have to run my script, dependent.pl. But when bisect jumps half way down the code, my script doesn't exist on Master and so it's impossible to test.</p>
  
  <p>I believe this is because bisect pulls you out into a headless state, but in this case I really want to be in the context of this other history/changeset, and not floating in the ether.</p>
  
  <p>Before anyone jumps to hit the <em>you're doing it wrong</em> buzzer, our team likes merging branches in these situations as the metaphor works well for this situation, not rebase-ing.</p>
  
  <p>I'll demo this by creating a sample repo:</p>
  
  <pre><code>git init
  
  echo 'sub f { print $_; }' &gt; main.pl
  git add .
  git commit -a -m "inital commit"
  
  git branch feature-x
  git checkout feature-x
  echo 'main::f(1)' &gt; dependent.pl
  git add .
  git commit -a -m "Starting work on feature X"
  git tag dev-1.0
  
  git checkout master
  echo "sub f { return 1; }" &gt; main.pl
  git commit -a -m "sub f { return 1; }"
  echo "sub f { return 2; }" &gt; main.pl
  git commit -a -m "sub f { return 2; }"
  echo "sub f { return 3; }" &gt; main.pl
  git commit -a -m "sub f { return 3; }"
  
  git tag release-1.0
  
  git checkout feature-x
  git merge master
  
  echo 'print main::f();' &gt; dependent.pl
  git commit -a -m "Updating call to f"
  </code></pre>
  
  <p>So now you get a repo that looks like this:</p>
  
  <pre><code>o Updating call to f ( Head of branch 'feature-x' )
  o Merge branch master onto feature-x
  |\
  | o sub f { return 3; } (TAG release-1.0) ( Head of branch 'master' )
  | o sub f { return 2; }
  | o sub f { return 1; }
  o | Starting work on feature X ( TAG 'dev-1.0' )
   \|
    o initial commit
  </code></pre>
  
  <p>So I run the command <code>git bisect start feature-x dev-1.0</code> expecting I'll be able to find what broke my code in dependent.pl, I end up on commit 'sub f { return 2 }' without my history of changes from feature-x (i.e. If I run <code>ls</code>, all I see is main.pl and dependent.pl is missing).</p>
  
  <p>This puts me in an untestable state. I cannot know if the current commit broke my work or not, nor can I say that commits on master broke it, so I can't say this commit is good or bad.</p>
  
  <p>How can I test what broke my current branch?</p>