forked from mirrors/jj
revset: use Index::has_id()
for checking if a commit has been indexed
This avoids another use of `IndexEntry`.
This commit is contained in:
parent
baea314fc0
commit
ce5c90b4e5
1 changed files with 1 additions and 1 deletions
|
@ -1449,7 +1449,7 @@ fn resolve_full_commit_id(
|
|||
let commit_id = CommitId::new(binary_commit_id);
|
||||
match repo.store().get_commit(&commit_id) {
|
||||
// Only recognize a commit if we have indexed it
|
||||
Ok(_) if repo.index().entry_by_id(&commit_id).is_some() => Ok(Some(vec![commit_id])),
|
||||
Ok(_) if repo.index().has_id(&commit_id) => Ok(Some(vec![commit_id])),
|
||||
Ok(_) | Err(BackendError::ObjectNotFound { .. }) => Ok(None),
|
||||
Err(err) => Err(RevsetError::StoreError(err)),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue