Skip to content

Commit f4abcff

Browse files
fix(onProgress): the "Resolving deltas" count was off by 1
1 parent 2c601b6 commit f4abcff

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "git-essentials",
3-
"version": "0.3.25",
3+
"version": "0.3.26",
44
"description": "The essential GIT commands",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/models/GitPackIndex.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export class GitPackIndex {
211211
const objectsByDepth = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
212212
for (let offsetStr in offsetToObject) {
213213
const offset = Number(offsetStr)
214-
const percent = Math.floor((count++ * 100) / totalObjectCount!)
214+
const percent = Math.floor((count * 100) / totalObjectCount!)
215215
if (percent !== lastPercent) {
216216
if (onProgress) {
217217
await onProgress({
@@ -221,6 +221,7 @@ export class GitPackIndex {
221221
})
222222
}
223223
}
224+
count++
224225
lastPercent = percent
225226

226227
const o = offsetToObject[offset]

0 commit comments

Comments
 (0)