0

We see this doing a git pull on branch myfeature git reports:

remote: Counting objects: 78, done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 78 (delta 36), reused 0 (delta 0)
Unpacking objects: 100% (78/78), done.
From ssh://stash.xeon.net:7999/core/myproject
   eb0523c..a796ad2  myfeature     -> origin/myfeature
   63c5668..a11d406  master     -> origin/master
 * [new tag]         myproject-7.9.0.13 -> myproject-7.9.0.13
 * [new tag]         myproject-8.0.0.0 -> myproject-8.0.0.0
Updating eb0523c..a796ad2
Fast-forward
 xxxmyproject/pom.xml       | 2 +-
 app/pom.xml          | 2 +-
 database/pom.xml     | 2 +-
 distribution/pom.xml | 2 +-
 env/pom.xml          | 2 +-
 pom.xml              | 2 +-
 server/pom.xml       | 2 +-
 web/pom.xml          | 2 +-
 xsd/pom.xml          | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

How can you determine which of the two branches (myfeature or master) contained these 78 (or 9) changes?

In addition why does git indicate Total 78 (delta 36) but then see only 9 files changed?

Marcus Leon
  • 55,199
  • 118
  • 297
  • 429

4 Answers4

2

The numbers in the total, delta line are git objects, which are discussd quite thoroughly in this answer

As to which branch had the 9 files updated, you are pulling origin myfeature to your local feature branch, as that is the active branch.

Updating eb0523c..a796ad2 shows you the commit shas that are moving, and you'll notice those are the same shas listed in the myfeature line:

eb0523c..a796ad2  myfeature     -> origin/myfeature
Community
  • 1
  • 1
DVG
  • 17,392
  • 7
  • 61
  • 88
1

Why do you see Total 78 (delta 36) but then see only 9 files changed? What does the total/delta represent?

Delta is the space in KiB saved by compression; I'm not absolutely sure on total, but that could be the uncompressed size of changes.

How can you determine which of the two branches (myfeature or master) contained these 78 (or 9) changes?

Not at all. That's not how git works. myfeature and master could be absolutely identical, or totally disjoint. What you see is the amount of changes -- how that influences your local state is on another sheet of paper.

Generally, if you're in branch "A" and do a pull, you will only change that branch by merging in the branch you ex- or implicitly specified when pulling. When you checkout branch "B", and there have been changes, git will tell you something like

Local branch B 91 commits behind remote origin. Use git pull to update.
Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
1

In your pull log you get an update for master from 63c5668..a11d406 and an update for myfeature eb0523c..a796ad2 you can for example diff --stat to see what changed in the move from 63c5668 to a11d406 by

git diff --stat 63c5668 a11d406

and identify what files changed in which branch by that pull.

ikrabbe
  • 1,909
  • 12
  • 25
1
remote: Counting objects: 78, done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 78 (delta 36), reused 0 (delta 0)
Unpacking objects: 100% (78/78), done.
From ssh://stash.xeon.net:7999/core/myproject
   eb0523c..a796ad2  myfeature     -> origin/myfeature
   63c5668..a11d406  master     -> origin/master
 * [new tag]         myproject-7.9.0.13 -> myproject-7.9.0.13
 * [new tag]         myproject-8.0.0.0 -> myproject-8.0.0.0

This part of the output concerns the whole repository and not any one branch.

git pull is really a convenience command, equivalent to running git fetch and then fast-forwarding the current branch to its remote upstream, if it has one. The output cited above comes from git fetch.

In addition why does git indicate Total 78 (delta 36) but then see only 9 files changed?

As I wrote above the former number concerns the result of fetching the changes from remote repositories (typically there is one, named origin by default). The number actually means the amount of git objects, that is, the files residing in .git/objects. 9 files changed concerns the fast-forward of the current branch (myfeature).

werkritter
  • 1,479
  • 10
  • 12