Skip to content

Commit e4166c5

Browse files
authored
Merge pull request go-git#57 from vashish1/Rename_Changed
plumbing: object, Fixed the ambiguous implicit conversions causing errors while building .
2 parents 79798d4 + 5b59577 commit e4166c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plumbing/object/rename.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ func (i *similarityIndex) common(dst *similarityIndex) uint64 {
709709
}
710710

711711
func (i *similarityIndex) add(key int, cnt uint64) error {
712-
key = int(uint32(key) * 0x9e370001 >> 1)
712+
key = int(uint32(key)*0x9e370001 >> 1)
713713

714714
j := i.slot(key)
715715
for {
@@ -769,11 +769,11 @@ func (i *similarityIndex) slot(key int) int {
769769
// We use 31 - hashBits because the upper bit was already forced
770770
// to be 0 and we want the remaining high bits to be used as the
771771
// table slot.
772-
return int(uint32(key) >> (31 - i.hashBits))
772+
return int(uint32(key) >> uint(31 - i.hashBits))
773773
}
774774

775775
func shouldGrowAt(hashBits int) int {
776-
return (1 << hashBits) * (hashBits - 3) / hashBits
776+
return (1 << uint(hashBits)) * (hashBits - 3) / hashBits
777777
}
778778

779779
func (i *similarityIndex) grow() error {
@@ -788,7 +788,7 @@ func (i *similarityIndex) grow() error {
788788

789789
// TODO(erizocosmico): find a way to check if it will OOM and return
790790
// errIndexFull instead.
791-
i.hashes = make([]keyCountPair, 1<<i.hashBits)
791+
i.hashes = make([]keyCountPair, 1<<uint(i.hashBits))
792792

793793
for _, v := range old {
794794
if v != 0 {

0 commit comments

Comments
 (0)