EWPTHPFKC63MW6PN344NKCJQD6KTOXBJHPKHTQEE3EHCKPRCZN2AC
fn find_version_date(&self, spec: &str) -> Result<NaiveDate, Error> {
let obj = self.git.repo.revparse_single(spec)?;
Ok(
if let Some(date) = obj
.as_tag()
.and_then(|tag| tag.tagger())
.map(|tagger| tagger.when())
.map(|time| date_from_time(&time))
{
date
} else {
let commit = obj.peel_to_commit()?;
date_from_time(&commit.time())
},
)
}