diff options
Diffstat (limited to 'makima/src/server')
| -rw-r--r-- | makima/src/server/handlers/mesh_daemon.rs | 34 | ||||
| -rw-r--r-- | makima/src/server/state.rs | 7 |
2 files changed, 41 insertions, 0 deletions
diff --git a/makima/src/server/handlers/mesh_daemon.rs b/makima/src/server/handlers/mesh_daemon.rs index 0d00f5b..9833d51 100644 --- a/makima/src/server/handlers/mesh_daemon.rs +++ b/makima/src/server/handlers/mesh_daemon.rs @@ -410,6 +410,19 @@ pub enum DaemonMessage { /// User-provided checkpoint message message: String, }, + /// Notification that git config was inherited + GitConfigInherited { + /// Whether the operation succeeded + success: bool, + /// Git user.email that was inherited + #[serde(rename = "userEmail")] + user_email: Option<String>, + /// Git user.name that was inherited + #[serde(rename = "userName")] + user_name: Option<String>, + /// Error message if operation failed + error: Option<String>, + }, } /// Validated daemon authentication result. @@ -1239,6 +1252,27 @@ async fn handle_daemon_connection(socket: WebSocket, state: SharedState, auth_re }); } } + Ok(DaemonMessage::GitConfigInherited { + success, + user_email, + user_name, + error, + }) => { + if success { + tracing::info!( + daemon_id = %daemon_uuid, + user_email = ?user_email, + user_name = ?user_name, + "Daemon inherited git config" + ); + } else { + tracing::warn!( + daemon_id = %daemon_uuid, + error = ?error, + "Failed to inherit git config" + ); + } + } Err(e) => { tracing::warn!("Failed to parse daemon message: {}", e); } diff --git a/makima/src/server/state.rs b/makima/src/server/state.rs index 6a56f21..479eadf 100644 --- a/makima/src/server/state.rs +++ b/makima/src/server/state.rs @@ -413,6 +413,13 @@ pub enum DaemonCommand { delete_branch: bool, }, + /// Inherit git config (user.email, user.name) from a directory + InheritGitConfig { + /// Directory to read git config from (defaults to daemon's working directory) + #[serde(rename = "sourceDir")] + source_dir: Option<String>, + }, + /// Error response Error { code: String, message: String }, } |
