Skip to main content

show_file_at

Function show_file_at 

Source
pub fn show_file_at(
    dir: &Path,
    revision: &str,
    rel_path: &str,
) -> Option<String>
Expand description

rel_path’s content at revision (git show <revision>:<rel_path>, e.g. Git → Open File at Revision…). None when revision doesn’t resolve, the path isn’t in that tree, or revision fails the same validation checkout applies to a ref name.