Merge "Scans repo projects by longest path match first, rather than shortest."
diff --git a/split/manifest_split.py b/split/manifest_split.py
index a5edb30..3e4698e 100644
--- a/split/manifest_split.py
+++ b/split/manifest_split.py
@@ -185,7 +185,7 @@
   """
   parts = input_path.split("/")
 
-  for index in range(0, len(parts)):
+  for index in reversed(range(0, len(parts))):
     project_path = os.path.join(*parts[:index + 1])
     if project_path in repo_projects:
       return project_path