Web lists-archives.com

Re: Git pull confusing output




Will <william.duclot@xxxxxxxxx> writes:

> I’m far from being a guru, but I consider myself a competent Git
> user. Yet, here’s my understanding of the output of one the most-used
> commands, `git push`:
>> Counting objects: 6, done.
> No idea what an “object” is. Apparently there’s 6 of them
> here. What does “counting” them means? Should I care?

You vaguely recall that the last time you pushed you saw ~400
objects counted there, so you get the feeling how active you were
since then.

It is up to you if you are interested in such a feel of the level of
activity.  "git fetch" (hence "git pull") would also give you a
similar "feel", e.g. "the last fetch was ~1200 objects and today's
is mere ~200, so it seems it is a relatively slow day".

As to "what is an object?", there are plenty of Git tutorials and
books to learn the basics from.  Again, it is up to you if you care.

>> Delta compression using up to 4 threads.
> No idea what is “delta compression”, I suppose something is being
> compressed. It’s using anything between 1 and 4 threads, which is not
> a very precise or useful information. Should I care?

Likewise.

>> Compressing objects: 100% (6/6), done.
> I still don’t know what objects are, but I appreciate having feedback
> on progress

Exactly.

>> Writing objects: 100% (6/6), 656 bytes | 656.00 KiB/s, done.
> Writing what, where? Should I care? Still good to have feedback

You are pushing the data in commits you wrote, modifications you
made to files, etc., to the other side, so that is what is written
to the other side.  Is there any other thing you might suspect that
is written in this context, to make you think a clarification is
needed in the above message?

>> Total 6 (delta 4), reused 0 (delta 0)
> No idea what any of those numbers mean. Should I care?

It is up to you to get interested in these details and learn what
they mean.  In this case, among these 6 objects transferred, Git
managed to find that 4 are similar to other objects the other side
already has or being sent by this push and can be transferred very
efficiently by sending only the difference, which is what "delta"
means.

>> remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
> I do know what’s a remote, but I don’t know what “resolving
> deltas” means. There’s local objects now? I don’t understand what
> happened to those local objects, are they the byproduct of the delta
> resolving or the input or something else? Should I care?

The "remote:" prefix is "the other side said the following".  IOW,
you are seeing the message from the receiving end.  As you sent 4
objects as mere "difference" (not the whole data needed to know
every byte of the file or directory), the receiving side needed to
find the object the "difference" was relative to, and reassemble
what you would have sent if there weren't delta compression.  These
4 local objects were local from the point of view of the other side,
i.e. the repository that received your push.

The information density of this one is much lower than the previous
progress output lines.  This one is primarily to give you the feeling 
of relative speed (you've seen how fast the "writing" phase which is
constrained mostly by over-the-wire speed already, and now you are
observing how many more seconds are spent to post-process the data
sent over the wire) and avoiding to get you bored.

I think we have "--quiet" option for those who do not care.