forked from mirrors/jj
git_backend: use .strip_suffix() instead of manual slicing
This commit is contained in:
parent
9bd84c55e0
commit
f5aa739c70
1 changed files with 2 additions and 2 deletions
|
@ -604,9 +604,9 @@ impl Backend for GitBackend {
|
|||
}
|
||||
0o100644 => {
|
||||
let id = FileId::from_bytes(entry.id().as_bytes());
|
||||
if name.ends_with(CONFLICT_SUFFIX) {
|
||||
if let Some(basename) = name.strip_suffix(CONFLICT_SUFFIX) {
|
||||
(
|
||||
&name[0..name.len() - CONFLICT_SUFFIX.len()],
|
||||
basename,
|
||||
TreeValue::Conflict(ConflictId::from_bytes(entry.id().as_bytes())),
|
||||
)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue