Re: [PATCH] repack: call prune_packed_objects() and update_server_info() directly

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

 



On Sat, Sep 13, 2014 at 09:28:01AM +0200, René Scharfe wrote:

> Call the functions behind git prune-packed and git update-server-info
> directly instead of using run_command().  This is shorter, easier and
> quicker.

It can also introduce bugs, since a lot of git code assumes it is
running in a single process and can die() or mark up global variables at
will. :)

I gave a quick read-through of the code and I think these calls are OK.
The two things I noticed were:

  1. We might die on a malloc failure that would otherwise go unnoticed
     in a sub-process. That's probably OK.

  2. The info/packs file is generated from our internal packed_git list.
     This list can get crufty if you have a long-running process that
     accesses objects and other processes are repacking. I think that's
     OK here; the parent repack process is not very long-lived.

I did, however, notice that the code we are calling has some problems of
its own. :) Here are some fixes:

  [1/3]: prune-packed: fix minor memory leak
  [2/3]: make update-server-info more robust
  [3/3]: server-info: clean up after writing info/packs

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]