title: Why is git apply not finding the file to patch in the current directory?
body: <p>I want to apply a patch to a file in the current directory. The path in the patch file says just a/FILETOPATCH.something b/FILETOPATCH.something. If I use this with git apply it isn't working. The file to patch and the .patch file are in the same directory. </p>
  
  <p>I tried the --directory and -p option in many variants with no success.</p>
  
  <p>Using patch -p1 &lt; patchfile.patch is working fine. </p>
  
  <p>If I set an absolute path from the repository root inside the .patch file it is working with git apply as well, but there must surely a way without editing patch fieles.</p>
  
  <p><strong>This will work with git apply</strong></p>
  
  <pre><code>diff --git a/htdocs/something/whatever/file.code b/htdocs/something/whatever/file.code
  index 385f3f4..07d8062 100644
  --- a/htdocs/something/whatever/file.code
  +++ b/htdocs/something/whatever/file.code
  ...
  PATCH DATA
  ...
  </code></pre>
  
  <p><strong>But not this</strong> (this is the original)</p>
  
  <pre><code>diff --git a/file.code b/file.code
  index 385f3f4..07d8062 100644
  --- a/file.code
  +++ b/file.code
  ...
  PATCH DATA
  ...
  </code></pre>
  
  <p>Any ideas how to get git apply working without changing the patch files?</p>