MCPcopy Create free account
hub / github.com/douglance/devsql / extract_branch_from_message

Function extract_branch_from_message

crates/vcsql/src/providers/stashes.rs:69–80  ·  view source on GitHub ↗
(message: &str)

Source from the content-addressed store, hash-verified

67}
68
69fn extract_branch_from_message(message: &str) -> String {
70 // Parse patterns like "WIP on main: abc123 message" or "On main: message"
71 if let Some(rest) = message
72 .strip_prefix("WIP on ")
73 .or_else(|| message.strip_prefix("On "))
74 {
75 if let Some(colon_pos) = rest.find(':') {
76 return rest[..colon_pos].to_string();
77 }
78 }
79 "unknown".to_string()
80}
81
82fn format_git_time(time: git2::Time) -> String {
83 let timestamp = time.seconds();

Callers 1

populateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected