init: Import non-standardly named Git repositories

We don't require that a directory end with ".git" in order to
be used as a backing store for a project, we just require that
there be a Git repository that is named exactly the project name,
or project.git, or project/.git.  Since we've already determined
this is a Git repository, but it doesn't match either of the latter
two cases, assumes its the former and just import it.

Change-Id: Idfebd1704997adb4909d0b2fa02594ac6a5f9ce0
Suggested-by: Antony Stubbs <antony.stubbs@gmail.com>
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2010-04-28 11:12:05 -07:00
parent cd49d8fd28
commit 0ea4907a0e

View File

@@ -85,8 +85,9 @@ public class GitProjectImporter {
} else {
name = prefix + name;
messages.warning("Ignoring non-standard name '" + name + "'");
continue;
if (!have.contains(name)) {
messages.warning("Importing non-standard name '" + name + "'");
}
}
if (have.contains(name)) {