expand_partial_commit/
expand-partial-commit.rs

1// """
2// $ git show c097ad2
3// [Git log for commit: c097ad2a8c07bf2e3df64e6e603eee0473ad8133]
4// """
5
6use color_eyre::eyre::Result;
7use git_meta::GitRepo;
8
9use std::env;
10
11fn main() -> Result<()> {
12    let current_dir = env::current_dir()?;
13
14    let repo = GitRepo::open(current_dir, None, None)?;
15
16    println!("{:?}", repo.to_info().expand_partial_commit_id("c097ad2"));
17
18    Ok(())
19}