Git track progress while fetching / fetching

Here is my problem:

When I do pull / fetch of some kind of large repository, I want to show the progress somewhere else than in the console (like the website) I know that in git 1.7.1.1 there is the -progress option, but I canโ€™t use this version and should stay with 1.6.0.4

Does anyone know how to watch git fetch / pull progress (e.g. how to extract the current percentage of load)

+4
source share
1 answer

I'm not sure how this can be done, since the -progress option is implemented in upload-pack.c

And git upload-pack mentions

git fetch-pack is called, finds out which objects are missing on the other side, and sends them after packing.

This command is usually not called directly by the end user .
The user interface for the protocol is on the git fetch-pack side, and a couple of programs are designed to download updates from a remote repository .
For push operations, see git send-pack.

So, if the server does not send such data back, I donโ€™t know how to extract it directly, except that you subtract this comment in upload-pack.c

  /* We read from pack_objects.err to capture stderr output for * progress bar, and pack_objects.out to capture the pack data. */ 

If you have server-side access to pack_objects.err , you may (possibly) be able to get information about this.

0
source

Source: https://habr.com/ru/post/1314945/


All Articles