cob: Remove redundant indentation
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
This commit is contained in:
parent
329af88ca6
commit
a50329eb43
|
|
@ -234,43 +234,40 @@ where
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let trailers: Vec<OwnedTrailer> = vec![trailers::ResourceCommitTrailer::from(resource).into()];
|
let trailers: Vec<OwnedTrailer> = vec![trailers::ResourceCommitTrailer::from(resource).into()];
|
||||||
|
let author = repo.signature()?;
|
||||||
|
let timestamp = author.when().seconds();
|
||||||
|
|
||||||
{
|
let mut headers = commit::Headers::new();
|
||||||
let author = repo.signature()?;
|
headers.push(
|
||||||
let timestamp = author.when().seconds();
|
"gpgsig",
|
||||||
|
&String::from_utf8(crypto::ssh::ExtendedSignature::from(signature).to_armored())?,
|
||||||
|
);
|
||||||
|
let author = commit::Author::try_from(&author)?;
|
||||||
|
|
||||||
let mut headers = commit::Headers::new();
|
#[cfg(debug_assertions)]
|
||||||
headers.push(
|
let (author, timestamp) = if let Ok(s) = std::env::var(crate::git::RAD_COMMIT_TIME) {
|
||||||
"gpgsig",
|
let timestamp = s.trim().parse::<i64>().unwrap();
|
||||||
&String::from_utf8(crypto::ssh::ExtendedSignature::from(signature).to_armored())?,
|
let author = commit::Author {
|
||||||
);
|
time: git_commit::author::Time::new(timestamp, 0),
|
||||||
let author = commit::Author::try_from(&author)?;
|
..author
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
let (author, timestamp) = if let Ok(s) = std::env::var(crate::git::RAD_COMMIT_TIME) {
|
|
||||||
let timestamp = s.trim().parse::<i64>().unwrap();
|
|
||||||
let author = commit::Author {
|
|
||||||
time: git_commit::author::Time::new(timestamp, 0),
|
|
||||||
..author
|
|
||||||
};
|
|
||||||
(author, timestamp)
|
|
||||||
} else {
|
|
||||||
(author, timestamp)
|
|
||||||
};
|
};
|
||||||
|
(author, timestamp)
|
||||||
|
} else {
|
||||||
|
(author, timestamp)
|
||||||
|
};
|
||||||
|
|
||||||
let oid = Commit::new(
|
let oid = Commit::new(
|
||||||
tree.id(),
|
tree.id(),
|
||||||
parents,
|
parents,
|
||||||
author.clone(),
|
author.clone(),
|
||||||
author,
|
author,
|
||||||
headers,
|
headers,
|
||||||
message,
|
message,
|
||||||
trailers,
|
trailers,
|
||||||
)
|
)
|
||||||
.write(repo)?;
|
.write(repo)?;
|
||||||
|
|
||||||
Ok((Oid::from(oid), timestamp as u64))
|
Ok((Oid::from(oid), timestamp as u64))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_manifest(
|
fn write_manifest(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue