mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-10 20:05:50 +02:00
Simplify equalHashes
Now that all hashes that we deal with are stored in the same pool, we can simply compare their addresses.
This commit is contained in:
parent
13c21365c0
commit
18e5b0a650
1 changed files with 2 additions and 3 deletions
|
@ -380,7 +380,6 @@ func equalHashes(a, b *string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
length := min(len(*a), len(*b))
|
||||
// parent hashes are only stored up to 20 characters for some reason so we'll truncate to that for comparison
|
||||
return (*a)[:length] == (*b)[:length]
|
||||
// We know that all hashes are stored in the pool, so we can compare their addresses
|
||||
return a == b
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue