Re: [PATCH v2 2/2] gc: config option for running --auto in background

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

 



On Mon, Feb 10, 2014 at 2:17 PM, Duy Nguyen <pclouds@xxxxxxxxx> wrote:
> On Mon, Feb 10, 2014 at 6:03 PM, Erik Faye-Lund <kusmabite@xxxxxxxxx> wrote:
>>> `gc --auto` takes time and can block the user temporarily (but not any
>>> -               if (!quiet)
>>> -                       fprintf(stderr,
>>> -                                       _("Auto packing the repository for optimum performance. You may also\n"
>>> -                                       "run \"git gc\" manually. See "
>>> -                                       "\"git help gc\" for more information.\n"));
>>> +               if (!quiet) {
>>> +                       if (detach_auto)
>>> +                               fprintf(stderr, _("Auto packing the repository in background for optimum performance.\n"));
>>> +                       else
>>> +                               fprintf(stderr, _("Auto packing the repository for optimum performance.\n"));
>>> +                       fprintf(stderr, _("See \"git help gc\" for manual housekeeping.\n"));
>>> +               }
>>> +               if (detach_auto)
>>> +                       /*
>>> +                        * failure to daemonize is ok, we'll continue
>>> +                        * in foreground
>>> +                        */
>>> +                       daemonize();
>>
>> While I agree that it should be OK, shouldn't we warn the user?
>
> If --quiet is set, we should not be printing anyway. If not, I thinkg
> we could only print "auto packing in background.." when we actually
> can do that, else just print the old message. It means an #ifdef
> NO_POSIX_GOODIES here again though..

Yuck, it's probably better to simply silently drop the detaching, I guess.
--
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]