pub fn summarize_opened_repository<W: Write>(
out: &ShellWriter<W>,
repository: &mut Repository,
) -> Result<(), Error>Expand description
Summarize information about a successfully opened repository.
§Example
use git_status_vars::{summarize_opened_repository, ShellWriter};
use git2::Repository;
summarize_opened_repository(
&ShellWriter::default(),
&mut Repository::open_from_env().unwrap(),
).unwrap();§Errors
This will return a git2::Error if there were problems getting repository
information. This outputs repo_state=... last, and does no error handling
after printing repo_state. Other variables may be outputted before an
error is returned.
§Panics
This may panic if it can’t resolve a symbolic reference to a symbolic target.