Thread (3 messages) 3 messages, 2 authors, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:59:53

Duy Nguyen [off-list ref] writes:
On Mon, Feb 10, 2014 at 6:03 PM, Erik Faye-Lund [off-list ref] wrote:
quoted
quoted
`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..
Didn't you change it not to die but return nosys or something?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help