Skip to content

RemoteProgress update broken while fetching #1969

Open
@fvalette-ledger

Description

@fvalette-ledger

Used version

Git: 2.34.1
GitPython: 3.1.43
Python: 3.10.12
FYI, progress bar rendered with rich (13.7.1)

Issue

RemoteProgress update method is called with ill-formed parameters when use with remote.fetch and thus leading to broken progress bar. This is working well with clone and/or clone_from. Update is called only once per git operation (e.g. COUNTING, COMPRESSING) with BEGIN and END opcode flag set and all messages concatenated.
It seems that remote progress lines are not parsed correctly while fetching remote.

Correct behavior with clone

Cloning git repository mypackage (revision=branch1)...
  Counting    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% eta 0:00:00                       
  Compressing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% eta 0:00:00                       
  Receiving   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% eta 0:00:00 6.45 MiB | 12.85 MiB/s
  Resolving   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% eta 0:00:00                       

Broken progress bar with fetch

Updating mypackage (revision=main)...
Count… remote: Counting objects:   1% (6/592)        remote: Counting objects:   2% (12/592)        remote: Counting objects:   3% (18/592)        remote: Counting objects:   4% (24/59…
Compr… remote: Compressing objects:   1% (3/240)        remote: Compressing objects:   2% (5/240)        remote: Compressing objects:   3% (8/240)        remote: Compressing objects:  …
Recei… Receiving objects:  77% (456/592)Receiving objects:  78% (462/592)Receiving objects:  79% (468/592)Receiving objects:  80% (474/592)Receiving objects:  81% (480/592)Receiving ob…
Resol… Resolving deltas:   1% (5/406)Resolving deltas:   2% (9/406)Resolving deltas:   3% (13/406)Resolving deltas:   4% (17/406)Resolving deltas:   5% (21/406)Resolving deltas:   6% (…

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions