syntax = "proto3";

package git.v1;

// Mirrors: cmd/init.rs — InitRepositoriesParams
message InitRepoParams {
  string namespace = 1;
  string repo_name = 2;
  string default_branch = 3;
  optional string description = 4;
  bool initialize_with_readme = 5;
  bool enable_lfs = 6;
}

message InitBareRequest {
  string storage_root = 1;
  InitRepoParams params = 2;
}

message InitBareResponse {
  string storage_path = 1;
}

message SetDefaultBranchRequest {
  string repo_id = 1;
  string branch_name = 2;
}

message SetDefaultBranchResponse {}

message CloneBareRequest {
  string storage_root = 1;
  string source_url = 2;
  string namespace = 3;
  string repo_name = 4;
}

message CloneBareResponse {
  string storage_path = 1;
}

service InitService {
  rpc InitBare(InitBareRequest) returns (InitBareResponse);
  rpc SetDefaultBranch(SetDefaultBranchRequest) returns (SetDefaultBranchResponse);
  rpc CloneBare(CloneBareRequest) returns (CloneBareResponse);
}