git: manifest: always use .repo/manifests/ for the include dir

Even if the manifest lives at .repo/manifests.xml, repo will use
.repo/manifests/ to process include directives.  Stop assuming that
.repo/manifests.xml is a symlink pointing to the actual manifest
dir that we can follow.

BUG=chromium:1055830
TEST=`./run_tests` pass

Change-Id: I449c0953277de3428c67ce8a816b8eb5371ee5c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2072618
Reviewed-by: Sean Abraham <seanabraham@chromium.org>
Commit-Queue: Sean Abraham <seanabraham@chromium.org>
Tested-by: Sean Abraham <seanabraham@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2075747
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/lib/git.py b/lib/git.py
index b2ed600..ebe17c9 100644
--- a/lib/git.py
+++ b/lib/git.py
@@ -583,7 +583,9 @@
         path, manifest_path, search=search)
 
     self.manifest_path = os.path.realpath(manifest_path)
-    manifest_include_dir = os.path.dirname(self.manifest_path)
+    # The include dir is always the manifest repo, not where the manifest file
+    # happens to live.
+    manifest_include_dir = os.path.join(self.root, '.repo', 'manifests')
     self.manifest_branch = self._GetManifestsBranch(self.root)
     self._content_merging = {}
     Manifest.__init__(self, self.manifest_path,