Skip to main content

author_environment

Function author_environment 

Source
pub fn author_environment(output: &str) -> Vec<(String, String)>
Expand description

What: The environment native git commit gives the hook, from the landed commit’s %an, %ae and raw %ad. Why: Hooks read GIT_AUTHOR_*; the incumbent takes the NUL-separated fields and drops one trailing newline.

In TS you’d write (pseudocode):

const [name = '', email = '', date = ''] = output.replace(/\n$/, '').split('\0');