{"thread":{"id":"23973","subject":"[PATCHv2] git-instaweb: Add option to reuse previous config file","startedAt":"2010-06-01T21:59:49Z","lastAt":"2010-06-01T22:24:35Z","messageCount":2,"participants":["Pavan Kumar Sunkara","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"142729","messageId":"1275429589-30634-1-git-send-email-pavan.sss1991@gmail.com","threadId":"23973","inReplyTo":null,"subject":"[PATCHv2] git-instaweb: Add option to reuse previous config file","fromName":"Pavan Kumar Sunkara","fromEmail":"pavan.sss1991@gmail.com","sentAt":"2010-06-01T21:59:49Z","receivedAt":"2010-06-01T21:59:49Z","isPatch":false,"sender":{"key":"pavan.sss1991@gmail.com","avatar":"https://avatars.githubusercontent.com/u/174703?v=4"},"body":"Add an option to git-instaweb which allows the usage of the old\ngitweb_config.perl situated in '.git/gitweb' dir. When the option\nis in use, gitweb_config.perl generated by git-instaweb won't be\noverwritten.\n\nUsage:\n\tgit instaweb --reuse-config\n\nExample:\n\tWhen I use git-instaweb, it is tiring to add customised\nconfiguration (like highlight featues enabling) to the gitweb_config.perl\nfile everytime I initiate the server. With this,it's enough to use\nthis option.\n\nSigned-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>\n---\n Documentation/git-instaweb.txt |    5 ++++-\n git-instaweb.sh                |    8 +++++++-\n 2 files changed, 11 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-instaweb.txt b/Documentation/git-instaweb.txt\nindex 2c3c4d2..0e7e20b 100644\n--- a/Documentation/git-instaweb.txt\n+++ b/Documentation/git-instaweb.txt\n@@ -9,7 +9,7 @@ SYNOPSIS\n --------\n [verse]\n 'git instaweb' [--local] [--httpd=<httpd>] [--port=<port>]\n-               [--browser=<browser>]\n+               [--browser=<browser>] [--reuse-config]\n 'git instaweb' [--start] [--stop] [--restart]\n \n DESCRIPTION\n@@ -49,6 +49,9 @@ OPTIONS\n \tlinkgit:git-web--browse[1] for more information about this. If\n \tthe script fails, the URL will be printed to stdout.\n \n+--reuse-config::\n+\tThe previous gitweb_config.perl will not be overwritten.\n+\n --start::\n \tStart the httpd instance and exit.  This does not generate\n \tany of the configuration files for spawning a new instance.\ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex 1af4d5a..1c704a3 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -13,6 +13,7 @@ p,port=        the port to bind to\n d,httpd=       the command to launch\n b,browser=     the browser to launch\n m,module-path= the module path (only needed for apache2)\n+reuse-config    reuse previous gitweb_config.perl from GIT_DIR\n  Action\n stop           stop the web server\n start          start the web server\n@@ -27,6 +28,7 @@ httpd=\"$(git config --get instaweb.httpd)\"\n root=\"$(git config --get instaweb.gitwebdir)\"\n port=$(git config --get instaweb.port)\n module_path=\"$(git config --get instaweb.modulepath)\"\n+no_reuse=true\n \n conf=\"$GIT_DIR/gitweb/httpd.conf\"\n \n@@ -171,6 +173,10 @@ do\n \t\tshift\n \t\tmodule_path=\"$1\"\n \t\t;;\n+\t--reuse-config)\n+\t\tshift\n+\t\tno_reuse=false\n+\t\t;;\n \t--)\n \t\t;;\n \t*)\n@@ -551,7 +557,7 @@ our \\$projects_list = \\$projectroot;\n EOF\n }\n \n-gitweb_conf\n+test \"$no_reuse\" = true || test ! -e \"$GITWEB_CONFIG\" && gitweb_conf\n \n resolve_full_httpd\n mkdir -p \"$fqgitdir/gitweb/$httpd_only\"\n-- \n1.7.1.443.g62265.dirty\n"},{"id":"142730","messageId":"201006020024.36458.jnareb@gmail.com","threadId":"23973","inReplyTo":"1275429589-30634-1-git-send-email-pavan.sss1991@gmail.com","subject":"Re: [PATCHv2] git-instaweb: Add option to reuse previous config file","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-06-01T22:24:35Z","receivedAt":"2010-06-01T22:24:35Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Pavan Kumar Sunkara wrote:\n\n> Add an option to git-instaweb which allows the usage of the old\n> gitweb_config.perl situated in '.git/gitweb' dir. When the option\n> is in use, gitweb_config.perl generated by git-instaweb won't be\n> overwritten.\n> \n> Usage:\n> \tgit instaweb --reuse-config\n> \n> Example:\n> \tWhen I use git-instaweb, it is tiring to add customised\n> configuration (like highlight featues enabling) to the gitweb_config.perl\n> file everytime I initiate the server. With this,it's enough to use\n> this option.\n> \n> Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>\n\nThis addresses my issues:\n\nAcked-by: Jakub Narebski <jnareb@gmail.com>\n\n-- \nJakub Narebski\nPoland\n"}]}