Re: [PATCH 1/2] git-commit: Disallow unchanged tree in non-merge mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 13, 2007 at 06:54:02PM -0700, Linus Torvalds wrote:
> On Thu, 13 Sep 2007, Junio C Hamano wrote:
> > Dmitry V. Levin writes: 
> > > Yes, the check looks almost redundant if run_status is enabled, but
> > > - the bug fixed by commit v1.5.3.1-15-g4fb5fd5 was found due to
> > >   this check;
> > > - the check itself is very cheap compared to run_status;
> > 
> > That is worrisome.  Maybe run_status is too expensive because it
> > is doing something stupid?  IOW, can you make run_status cheaper
> > for you?
> 
> It would be interesting to hear what the situation is that makes 
> run_status be too expensive.

The situation when runstatus is too expensive is committing a large tree
with massive changes.  More or less real life example is committing
several openoffice.org unpacked tarballs.

First commit is relatively fast:
$ mkdir 1
$ cd 1
$ git init
$ tar xf ../OOo_2.0.4_src.tar.gz
$ mv OO* tree
$ git add tree                          (about 1.75 minutes)
$ git commit -m 2.0.4 >/dev/null        (about 30 seconds)
$ git repack -a -d -q                   (about 8.5 minutes)
$ du -h .git/objects/pack
316M    .git/objects/pack
$ cd -

Second commit is slow:
$ mkdir 2
$ cd 2
$ git init
$ tar xf ../OOo_1.1.5_src.tar.gz
$ mv OO* tree
$ git add tree                          (about 50 seconds)
$ git commit -m 1.1.5 >/dev/null        (about 20 seconds)
$ git repack -a -d -q                   (about 2 minutes)
$ du -h .git/objects/pack
202M    .git/objects/pack
$ rm -rf tree
$ rm -f .git/index
$ tar xf ../OOo_2.0.4_src.tar.gz
$ mv OO* tree
$ git add tree                          (about 1.75 minutes)
$ git commit -m 2.0.4 >/dev/null
git-runstatus runs much longer (tens of minutes, I do not remember), and 
finally fails, either with OOM error (if no sufficient virtual memory
available; on x86-64 64G was not enough) or segfaults.


-- 
ldv

Attachment: pgpouCAUdQ43J.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux