Re: [PATCH 2/5] diff --quiet
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 15, 2007, 17:43 UTC
- Message-ID
- <Pine.LNX.4.63.0703151841180.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <81b0412b0703150655y3d2a71d3t8db6e334ecf23ca1@mail.gmail.com>
Hi,
On Thu, 15 Mar 2007, Alex Riesen wrote:
Show 10 quoted lines
> On 3/15/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > > > $ git-rev-parse v2.6.16^{tree} v2.6.20^{tree}
> > > >
> > >
> > > Why would I want to benchmark --quiet with rev-parse?
> >
> > It is not benchmarking, but it is a faster solution: you can see if two
> > trees are different by comparing their SHA-1s.
>
> Can the same be done for index? (index-tree comparison)Theoretically, yes. Only that Junio did not accept my short-cut ":dir/" notation to mean "take the cache-tree from the index, or if it is dirty, construct it". However, in the latter case, it would not be a speed improvement, but the opposite.
> > (That, however, works only if you do not want something like "git diff > > -w"...) > > Why? Can't "git diff -w" quit early?
No, but "-w" means "ignore white space", which means that blobs can be deemed equal, even if they differ at the byte-per-byte level.
Ciao, Dscho