Skip site navigation (1) Skip section navigation (2)

Re: Idle git question: how come so many "objects"?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Idle git question: how come so many "objects"?
Date: 2010-12-01 07:08:31
Message-ID: 20101201070831.GB3449@svana.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, Dec 01, 2010 at 01:03:26AM -0500, Tom Lane wrote:
> So I just made a commit that touched four files in all six active
> branches, and I see:
> 
> $ git push   
> Counting objects: 172, done.
> Compressing objects: 100% (89/89), done.
> Writing objects: 100% (89/89), 17.07 KiB, done.
> Total 89 (delta 80), reused 0 (delta 0)
> To ssh://git(at)gitmaster(dot)postgresql(dot)org/postgresql.git
>    35a3def..8a6eb2e  REL8_1_STABLE -> REL8_1_STABLE
>    cfb6ac6..b0e2092  REL8_2_STABLE -> REL8_2_STABLE
>    301a822..0d45e8c  REL8_3_STABLE -> REL8_3_STABLE
>    61f8618..6bd3753  REL8_4_STABLE -> REL8_4_STABLE
>    09425f8..0a85bb2  REL9_0_STABLE -> REL9_0_STABLE
>    c0b5fac..225f0aa  master -> master
> 
> Now I realize that in addition to the four files there's a "tree" object
> and a "commit" object, but that still only adds up to 36 objects that
> should be created in this transaction.  How does it get to 172?  And
> then where do the 89 and 80 numbers come from?

IIRC, each directory also counts as an object. So if you change a file
in a/b/c/d you get 5 commit objects, one for the file and four for the
directories.

What the delta is for I don't know. Perhaps some of the diffs were the
same between branches and these got merged?

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog(at)svana(dot)org>   http://svana.org/kleptog/
> Patriotism is when love of your own people comes first; nationalism,
> when hate for people other than your own comes first. 
>                                       - Charles de Gaulle

In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2010-12-01 07:35:40
Subject: Re: crash-safe visibility map, take three
Previous:From: Tom LaneDate: 2010-12-01 06:03:26
Subject: Idle git question: how come so many "objects"?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group