forked from mirrors/jj
git_backend: generate change id from git2::Commit object
I'm going to extract a helper function that converts git2::Commit to backend::Commit struct, and the commit id can also be obtained from the git2::Commit object.
This commit is contained in:
parent
5dba0502cb
commit
0149e7b311
1 changed files with 1 additions and 1 deletions
|
@ -463,7 +463,7 @@ impl Backend for GitBackend {
|
|||
// leading 16 bytes to address that. We also reverse the bits to make it less
|
||||
// likely that users depend on any relationship between the two ids.
|
||||
let change_id = ChangeId::new(
|
||||
id.as_bytes()[4..HASH_LENGTH]
|
||||
commit.id().as_bytes()[4..HASH_LENGTH]
|
||||
.iter()
|
||||
.rev()
|
||||
.map(|b| b.reverse_bits())
|
||||
|
|
Loading…
Reference in a new issue