Skip to main content

head_source

Function head_source 

Source
pub fn head_source(docs_dir: &Path, doc_rel_path: &str) -> Option<String>
Expand description

The content of a doc at git HEAD, for the editor’s merge-against-HEAD view. docs_dir is the absolute docs directory; doc_rel_path is docs-relative (e.g. "guide/intro.md"). Returns None outside a repo, for an untracked file, or on any read error — the editor then shows no merge gutter.