Allow to use --enable-httpd with --slave

Slave now support running with the http daemon to be able to use git
fetching operations over the http protocol.

Change-Id: I3e7adf0d7ba5ff436394de35d08fba6f3b358aed
diff --git a/Documentation/pgm-daemon.txt b/Documentation/pgm-daemon.txt
index 3d7dd45..bcf2b1b 100644
--- a/Documentation/pgm-daemon.txt
+++ b/Documentation/pgm-daemon.txt
@@ -37,7 +37,7 @@
 --enable-httpd::
 --disable-httpd::
 	Enable (or disable) the internal HTTP daemon, answering
-	web requests.  Enabled by default.
+	web requests. Enabled by default when --slave is not used.
 
 --enable-sshd::
 --disable-sshd::
@@ -51,7 +51,7 @@
     or updates existing ones) or link:cmd-review.html[review]
     (sets approve marks) are disabled.
 +
-This option automatically implies '--disable-httpd --enable-sshd'.
+This option automatically implies '--enable-sshd'.
 
 --console-log::
 	Send log messages to the console, instead of to the standard
diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java
index 5be244b..8ea508f 100644
--- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java
+++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java
@@ -119,7 +119,7 @@
     sshd = false;
   }
 
-  @Option(name = "--slave", usage = "Support fetch only; implies --disable-httpd")
+  @Option(name = "--slave", usage = "Support fetch only")
   private boolean slave;
 
   @Option(name = "--console-log", usage = "Log to console (not $site_path/logs)")
@@ -191,9 +191,6 @@
     if (!httpd && !sshd) {
       throw die("No services enabled, nothing to do");
     }
-    if (slave && httpd) {
-      throw die("Cannot combine --slave and --enable-httpd");
-    }
 
     manager.add(GarbageCollectionLogFile.start(getSitePath()));
     if (consoleLog) {