File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/main/kotlin/com/jetpackduba/gitnuro/lfs Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -189,17 +189,20 @@ class LfsPrePushHook @AssistedInject constructor(
189189 }
190190
191191 private fun findLfsPointers (toPush : MutableSet <LfsPointer >, walk : ObjectWalk ) {
192- var obj: RevObject
192+ var obj: RevObject ?
193193 val r = walk.objectReader
194- while ((walk.nextObject().also { obj = it }) != null ) {
195- if (obj.type == Constants .OBJ_BLOB
196- && getObjectSize(r, obj) < LfsPointer .SIZE_THRESHOLD
197- ) {
194+
195+ obj = walk.nextObject()
196+
197+ while (obj != null ) {
198+ if (obj.type == Constants .OBJ_BLOB && getObjectSize(r, obj) < LfsPointer .SIZE_THRESHOLD ) {
198199 val ptr = loadLfsPointer(r, obj)
199200 if (ptr != null ) {
200201 toPush.add(ptr)
201202 }
202203 }
204+
205+ obj = walk.nextObject()
203206 }
204207 }
205208
You can’t perform that action at this time.
0 commit comments