aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/rename.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2020-07-06 01:52:08 +0200
committerGitHub <noreply@github.com>2020-07-06 01:52:08 +0200
commita9899594dfdde8bbfdf35fc7e8c2fc3ec5aa7fdb (patch)
treee7b28b456ef3ed90eafc026b506786bea5df179e /plumbing/object/rename.go
parent9ac753f4afb36feb1a1c22214c16e853db54aa00 (diff)
parentf9cf9a99fd51bff8e002900a3a73d117ba54c887 (diff)
downloadgo-git-a9899594dfdde8bbfdf35fc7e8c2fc3ec5aa7fdb.tar.gz
Merge pull request #117 from cristaloleg/fix-goreportcard
fix goreportcard warnings
Diffstat (limited to 'plumbing/object/rename.go')
-rw-r--r--plumbing/object/rename.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plumbing/object/rename.go b/plumbing/object/rename.go
index 35af1d6..7fed72c 100644
--- a/plumbing/object/rename.go
+++ b/plumbing/object/rename.go
@@ -536,7 +536,7 @@ var errIndexFull = errors.New("index is full")
// between two files.
// To save space in memory, this index uses a space efficient encoding which
// will not exceed 1MiB per instance. The index starts out at a smaller size
-// (closer to 2KiB), but may grow as more distinct blocks withing the scanned
+// (closer to 2KiB), but may grow as more distinct blocks within the scanned
// file are discovered.
// see: https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
type similarityIndex struct {
@@ -709,7 +709,7 @@ func (i *similarityIndex) common(dst *similarityIndex) uint64 {
}
func (i *similarityIndex) add(key int, cnt uint64) error {
- key = int(uint32(key)*0x9e370001 >> 1)
+ key = int(uint32(key) * 0x9e370001 >> 1)
j := i.slot(key)
for {
@@ -769,7 +769,7 @@ func (i *similarityIndex) slot(key int) int {
// We use 31 - hashBits because the upper bit was already forced
// to be 0 and we want the remaining high bits to be used as the
// table slot.
- return int(uint32(key) >> uint(31 - i.hashBits))
+ return int(uint32(key) >> uint(31-i.hashBits))
}
func shouldGrowAt(hashBits int) int {