{"thread":{"id":"23282","subject":"[PATCHv5 4/6] instaweb: add minification awareness","startedAt":"2010-04-01T05:36:49Z","lastAt":"2010-04-01T20:50:06Z","messageCount":3,"participants":["Mark Rada","Jakub Narebski","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"138324","messageId":"4BB430F1.60002@mailservices.uwaterloo.ca","threadId":"23282","inReplyTo":null,"subject":"[PATCHv5 4/6] instaweb: add minification awareness","fromName":"Mark Rada","fromEmail":"marada@uwaterloo.ca","sentAt":"2010-04-01T05:36:49Z","receivedAt":"2010-04-01T05:36:49Z","isPatch":false,"sender":{"key":"marada@uwaterloo.ca","avatar":"https://avatars.githubusercontent.com/u/38430?v=4"},"body":"This patch will cause git-instaweb to use the minified version of gitweb\nsupport files (e.g. CSS and JavaScript) if they were generated.\n\nWithout minification awareness, generating the minified version of\ngitweb's support files will generate a broken instaweb script since the\ncopy of gitweb.cgi will look for gitweb.min.* which will not exist.\n\nSigned-off-by: Mark Rada <marada@uwaterloo.ca>\n\n---\n\nNo changes since previous revision.\n\n\n Makefile        |   12 ++++++++++--\n git-instaweb.sh |    6 ++++--\n 2 files changed, 14 insertions(+), 4 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex ef1a232..c97021f 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1565,9 +1565,15 @@ gitweb:\n \n ifdef JSMIN\n GITWEB_PROGRAMS += gitweb/gitweb.min.js\n+GITWEB_JS = gitweb/gitweb.min.js\n+else\n+GITWEB_JS = gitweb/gitweb.js\n endif\n ifdef CSSMIN\n GITWEB_PROGRAMS += gitweb/gitweb.min.css\n+GITWEB_CSS = gitweb/gitweb.min.css\n+else\n+GITWEB_CSS = gitweb/gitweb.css\n endif\n OTHER_PROGRAMS +=  gitweb/gitweb.cgi  $(GITWEB_PROGRAMS)\n gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS)\n@@ -1590,11 +1596,13 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.\n \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n \t    -e '/@@GITWEB_CGI@@/r gitweb/gitweb.cgi' \\\n \t    -e '/@@GITWEB_CGI@@/d' \\\n-\t    -e '/@@GITWEB_CSS@@/r gitweb/gitweb.css' \\\n+\t    -e '/@@GITWEB_CSS@@/r $(GITWEB_CSS)' \\\n \t    -e '/@@GITWEB_CSS@@/d' \\\n-\t    -e '/@@GITWEB_JS@@/r gitweb/gitweb.js' \\\n+\t    -e '/@@GITWEB_JS@@/r $(GITWEB_JS)' \\\n \t    -e '/@@GITWEB_JS@@/d' \\\n \t    -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \\\n+            -e 's|@@GITWEB_CSS_NAME@@|$(GITWEB_CSS)|' \\\n+            -e 's|@@GITWEB_JS_NAME@@|$(GITWEB_JS)|' \\\n \t    $@.sh > $@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex 6a65f25..d4941a9 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -391,18 +391,20 @@ EOFGITWEB\n gitweb_css () {\n \tcat > \"$1\" <<\\EOFGITWEB\n @@GITWEB_CSS@@\n+\n EOFGITWEB\n }\n \n gitweb_js () {\n \tcat > \"$1\" <<\\EOFGITWEB\n @@GITWEB_JS@@\n+\n EOFGITWEB\n }\n \n gitweb_cgi \"$GIT_DIR/gitweb/gitweb.cgi\"\n-gitweb_css \"$GIT_DIR/gitweb/gitweb.css\"\n-gitweb_js  \"$GIT_DIR/gitweb/gitweb.js\"\n+gitweb_css \"$GIT_DIR/@@GITWEB_CSS_NAME@@\"\n+gitweb_js  \"$GIT_DIR/@@GITWEB_JS_NAME@@\"\n \n case \"$httpd\" in\n *lighttpd*)\n-- \n1.7.0.3.519.g7e0613\n"},{"id":"138336","messageId":"201004011310.01068.jnareb@gmail.com","threadId":"23282","inReplyTo":"4BB430F1.60002@mailservices.uwaterloo.ca","subject":"Re: [PATCHv5 4/6] instaweb: add minification awareness","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-04-01T11:09:59Z","receivedAt":"2010-04-01T11:09:59Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Thu, 1 Apr 2010, Mark Rada wrote:\n\n> This patch will cause git-instaweb to use the minified version of gitweb\n> support files (e.g. CSS and JavaScript) if they were generated.\n\nI was not sure if git-instaweb should use minified files or not, and\nthat is why I didn't add support for this to git-instaweb generation.\nBut I forgot that git-instaweb uses gitweb.cgi... which in turn can\nuse minified versions of gitweb support files.\n\n> \n> Without minification awareness, generating the minified version of\n> gitweb's support files will generate a broken instaweb script since the\n> copy of gitweb.cgi will look for gitweb.min.* which will not exist.\n\nGood catch!\n\n> \n> Signed-off-by: Mark Rada <marada@uwaterloo.ca>\n\nCC-ed Eric Wong, original author of git-instaweb.sh script.\n\n> ---\n> \n> No changes since previous revision.\n> \n> \n>  Makefile        |   12 ++++++++++--\n>  git-instaweb.sh |    6 ++++--\n>  2 files changed, 14 insertions(+), 4 deletions(-)\n> \n> diff --git a/Makefile b/Makefile\n> index ef1a232..c97021f 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -1565,9 +1565,15 @@ gitweb:\n>  \n>  ifdef JSMIN\n>  GITWEB_PROGRAMS += gitweb/gitweb.min.js\n> +GITWEB_JS = gitweb/gitweb.min.js\n> +else\n> +GITWEB_JS = gitweb/gitweb.js\n>  endif\n>  ifdef CSSMIN\n>  GITWEB_PROGRAMS += gitweb/gitweb.min.css\n> +GITWEB_CSS = gitweb/gitweb.min.css\n> +else\n> +GITWEB_CSS = gitweb/gitweb.css\n>  endif\n>  OTHER_PROGRAMS +=  gitweb/gitweb.cgi  $(GITWEB_PROGRAMS)\n>  gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS)\n> @@ -1590,11 +1596,13 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.\n>  \t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n>  \t    -e '/@@GITWEB_CGI@@/r gitweb/gitweb.cgi' \\\n>  \t    -e '/@@GITWEB_CGI@@/d' \\\n> -\t    -e '/@@GITWEB_CSS@@/r gitweb/gitweb.css' \\\n> +\t    -e '/@@GITWEB_CSS@@/r $(GITWEB_CSS)' \\\n>  \t    -e '/@@GITWEB_CSS@@/d' \\\n> -\t    -e '/@@GITWEB_JS@@/r gitweb/gitweb.js' \\\n> +\t    -e '/@@GITWEB_JS@@/r $(GITWEB_JS)' \\\n>  \t    -e '/@@GITWEB_JS@@/d' \\\n>  \t    -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \\\n> +            -e 's|@@GITWEB_CSS_NAME@@|$(GITWEB_CSS)|' \\\n> +            -e 's|@@GITWEB_JS_NAME@@|$(GITWEB_JS)|' \\\n>  \t    $@.sh > $@+ && \\\n>  \tchmod +x $@+ && \\\n>  \tmv $@+ $@\n> diff --git a/git-instaweb.sh b/git-instaweb.sh\n> index 6a65f25..d4941a9 100755\n> --- a/git-instaweb.sh\n> +++ b/git-instaweb.sh\n> @@ -391,18 +391,20 @@ EOFGITWEB\n>  gitweb_css () {\n>  \tcat > \"$1\" <<\\EOFGITWEB\n>  @@GITWEB_CSS@@\n> +\n>  EOFGITWEB\n>  }\n>  \n>  gitweb_js () {\n>  \tcat > \"$1\" <<\\EOFGITWEB\n>  @@GITWEB_JS@@\n> +\n>  EOFGITWEB\n>  }\n>  \n>  gitweb_cgi \"$GIT_DIR/gitweb/gitweb.cgi\"\n> -gitweb_css \"$GIT_DIR/gitweb/gitweb.css\"\n> -gitweb_js  \"$GIT_DIR/gitweb/gitweb.js\"\n> +gitweb_css \"$GIT_DIR/@@GITWEB_CSS_NAME@@\"\n> +gitweb_js  \"$GIT_DIR/@@GITWEB_JS_NAME@@\"\n>  \n>  case \"$httpd\" in\n>  *lighttpd*)\n> -- \n> 1.7.0.3.519.g7e0613\n> \n> \n\n-- \nJakub Narebski\nPoland\n"},{"id":"138359","messageId":"20100401205006.GA13580@dcvr.yhbt.net","threadId":"23282","inReplyTo":"201004011310.01068.jnareb@gmail.com","subject":"Re: [PATCHv5 4/6] instaweb: add minification awareness","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2010-04-01T20:50:06Z","receivedAt":"2010-04-01T20:50:06Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Jakub Narebski <jnareb@gmail.com> wrote:\n> On Thu, 1 Apr 2010, Mark Rada wrote:\n> \n> > This patch will cause git-instaweb to use the minified version of gitweb\n> > support files (e.g. CSS and JavaScript) if they were generated.\n> \n> I was not sure if git-instaweb should use minified files or not, and\n> that is why I didn't add support for this to git-instaweb generation.\n> But I forgot that git-instaweb uses gitweb.cgi... which in turn can\n> use minified versions of gitweb support files.\n\nIt can make distro installation footprints smaller, which would\nbe appreciated.\n\n> > Without minification awareness, generating the minified version of\n> > gitweb's support files will generate a broken instaweb script since the\n> > copy of gitweb.cgi will look for gitweb.min.* which will not exist.\n> \n> Good catch!\n> > \n> > Signed-off-by: Mark Rada <marada@uwaterloo.ca>\n\nThanks Jakub and Mark,\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n-- \nEric Wong\n"}]}