Skip to content

fix(asyncgit): correct swapped current/total in pack_progress callback#2973

Open
Noethix55555 wants to merge 1 commit into
gitui-org:masterfrom
Noethix55555:fix/gu-remote-pack-progress
Open

fix(asyncgit): correct swapped current/total in pack_progress callback#2973
Noethix55555 wants to merge 1 commit into
gitui-org:masterfrom
Noethix55555:fix/gu-remote-pack-progress

Conversation

@Noethix55555

Copy link
Copy Markdown

Callbacks::callbacks registers a pack_progress closure that receives (stage, current, total) from git2 but forwards them as (stage, total, current) to the private pack_progress method. The method's parameter names then label the git2 current as total and vice versa, so ProgressNotification::Packing { current, total } is emitted with the values inverted.

This makes the packing progress bar count from ~100% down to 0% (or saturate immediately) instead of advancing from 0% to 100%.

Fix: pass current, total in the correct order and align the private method's parameter names to match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant