On Thu, 23 Jun 2011, Gurjeet Singh wrote: > On Thu, Jun 23, 2011 at 4:23 AM, Jakub Narebski <jnareb@xxxxxxxxx> wrote: >> Gurjeet Singh <singh.gurjeet@xxxxxxxxx> writes: >> >>> I am on Linux Mint 10 and I tried the following command: >>> >>> $ git instaweb -d apache2 -p 1234 --start >>> Syntax error on line 1 of /mnt/storage/gurjeet/.git/gitweb/httpd.conf: >>> Invalid command 'server.document-root', perhaps misspelled or defined >>> by a module not included in the server configuration >>> Could not execute http daemon apache2 -f. >> >> Hmmm... it looks like starts apache2, but generates config file >> (httpd.conf) for lighttpd instead. >> >> Ahh... actually you started apache2, but didn't generate configuration >> file for it, so git-instaweb re-uses previous config file... which by >> default is lighttpd: >> >> start, --start >> Start the httpd instance and exit. This does not generate any of the >> configuration files for spawning a new instance. > > Now that's very unintuitive.... I am the impatient kind, and didn't > read the whole paragraph. I assumed --start would just start the > webserver (maybe run in daemon mode). I'm working on it... actually the patch series is ready to send; it will be sent as a reply to this email. I just hope that it wouldn't be lost being deeper in thread... >>> /mnt/storage/gurjeet/ is my $HOME. >> >> Nb. it doesn't mater where $HOME is, but where is git repository you >> were in when calling git-instaweb. > > Got it. I have some files of my home directory in a Git repository, so > $HOME is where the repository is. > > I have quite a few development related Git repositories under > $HOME/dev/ and instaweb shows all of them on the first page (with > description etc). IOW, is it supposed to recurse down all directories > to look for .git/ directories? > > .git > dev/EDB-ADVISORS/.git > dev/EDBAS/.git > dev/PCS/.git > dev/PEM/.git > dev/PGAGENT/.git > dev/POSTGRES/.git > dev/SERVICESTOOLS/.git > dev/SLONY/.git > > Is this expected? It is expected behavior. It is consequence of the fact that the default gitweb mode is to search for repositories recursively starting from given root; git-instaweb set this $projectsroot to the one directory up from $GIT_DIR. Alternate solution would be for git-instaweb to generate projects list file for gitweb with only single repository listed... Nevertheless usually you don't have repositories inside of working directory of other repositories. There was even idea floated to deprecate such support, but it didn't gained traction. One expected exception is when you use _submodules_; in this case you would probably want to see both supermodule and submodules (subrepositories). That is why I think that current git-instaweb behavior has sense. -- Jakub Narebski Poland -- 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