Use Project.NameKey in GitRepositoryManager
This simplifies all of the calling sites, where they have a Project.NameKey on hand and would prefer not to invoke .get() to convert it into a String. Change-Id: If661fc07cff542a57af3c28f27ab401ce7b3a656 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -93,11 +93,10 @@ public abstract class AbstractGitCommand extends BaseCommand {
|
||||
private void service() throws IOException, Failure {
|
||||
project = projectControl.getProjectState().getProject();
|
||||
|
||||
final String name = project.getName();
|
||||
try {
|
||||
repo = repoManager.openRepository(name);
|
||||
repo = repoManager.openRepository(project.getNameKey());
|
||||
} catch (RepositoryNotFoundException e) {
|
||||
throw new Failure(1, "fatal: '" + name + "': not a git archive", e);
|
||||
throw new Failure(1, "fatal: '" + project.getName() + "': not a git archive", e);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user