{"thread":{"id":"31971","subject":"[PATCH] gitweb.perl: fix %highlight_ext","startedAt":"2012-10-29T16:42:07Z","lastAt":"2012-11-04T17:43:09Z","messageCount":6,"participants":["rh","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"202127","messageId":"20121029094207.deafafed22ea70fbc4fbd4bb@lavabit.com","threadId":"31971","inReplyTo":null,"subject":"[PATCH] gitweb.perl: fix %highlight_ext","fromName":"rh","fromEmail":"richard_hubbe11@lavabit.com","sentAt":"2012-10-29T16:42:07Z","receivedAt":"2012-10-29T16:42:07Z","isPatch":true,"sender":{"key":"richard_hubbe11@lavabit.com","avatar":null},"body":"I also consolidated exts where applicable.\ni.e. c and h maps to c\n\n\n-- \n\ndiff --git a/a/gitweb.cgi b/b/gitweb.cgi\nindex 060db27..155b238 100755\n--- a/a/gitweb.cgi\n+++ b/b/gitweb.cgi\n@@ -246,19 +246,19 @@ our %highlight_basename = (\n        'Makefile' => 'make',\n );\n # match by extension\n+\n our %highlight_ext = (\n        # main extensions, defining name of syntax;\n        # see files in /usr/share/highlight/langDefs/ directory\n-       map { $_ => $_ }\n-               qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl sql make),\n+       (map { $_ => $_ } qw(py rb java css js tex bib xml awk bat ini spec tcl sql)),\n        # alternate extensions, see /etc/highlight/filetypes.conf\n-       'h' => 'c',\n-       map { $_ => 'sh'  } qw(bash zsh ksh),\n-       map { $_ => 'cpp' } qw(cxx c++ cc),\n-       map { $_ => 'php' } qw(php3 php4 php5 phps),\n-       map { $_ => 'pl'  } qw(perl pm), # perhaps also 'cgi'\n-       map { $_ => 'make'} qw(mak mk),\n-       map { $_ => 'xml' } qw(xhtml html htm),\n+       (map { $_ => 'c'   } qw(c h)),\n+       (map { $_ => 'sh'  } qw(sh bash zsh ksh)),\n+       (map { $_ => 'cpp' } qw(cpp cxx c++ cc)),\n+       (map { $_ => 'php' } qw(php php3 php4 php5 phps)),\n+       (map { $_ => 'pl'  } qw(pl perl pm)), # perhaps also 'cgi'\n+       (map { $_ => 'make'} qw(make mak mk)),\n+       (map { $_ => 'xml' } qw(xml xhtml html htm)),\n );\n \n # You define site-wide feature defaults here; override them with\n"},{"id":"202431","messageId":"20121102145425.GC11170@sigill.intra.peff.net","threadId":"31971","inReplyTo":"20121029094207.deafafed22ea70fbc4fbd4bb@lavabit.com","subject":"Re: [PATCH] gitweb.perl: fix %highlight_ext","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-11-02T14:54:25Z","receivedAt":"2012-11-02T14:54:25Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Oct 29, 2012 at 09:42:07AM -0700, rh wrote:\n\n> I also consolidated exts where applicable.\n> i.e. c and h maps to c\n> \n> \n> -- \n> \n> diff --git a/a/gitweb.cgi b/b/gitweb.cgi\n> index 060db27..155b238 100755\n> --- a/a/gitweb.cgi\n> +++ b/b/gitweb.cgi\n> @@ -246,19 +246,19 @@ our %highlight_basename = (\n>         'Makefile' => 'make',\n>  );\n>  # match by extension\n> +\n>  our %highlight_ext = (\n>         # main extensions, defining name of syntax;\n>         # see files in /usr/share/highlight/langDefs/ directory\n> -       map { $_ => $_ }\n> -               qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl sql make),\n> +       (map { $_ => $_ } qw(py rb java css js tex bib xml awk bat ini spec tcl sql)),\n>         # alternate extensions, see /etc/highlight/filetypes.conf\n> -       'h' => 'c',\n> -       map { $_ => 'sh'  } qw(bash zsh ksh),\n> -       map { $_ => 'cpp' } qw(cxx c++ cc),\n> -       map { $_ => 'php' } qw(php3 php4 php5 phps),\n> -       map { $_ => 'pl'  } qw(perl pm), # perhaps also 'cgi'\n> -       map { $_ => 'make'} qw(mak mk),\n> -       map { $_ => 'xml' } qw(xhtml html htm),\n> +       (map { $_ => 'c'   } qw(c h)),\n> +       (map { $_ => 'sh'  } qw(sh bash zsh ksh)),\n> +       (map { $_ => 'cpp' } qw(cpp cxx c++ cc)),\n> +       (map { $_ => 'php' } qw(php php3 php4 php5 phps)),\n> +       (map { $_ => 'pl'  } qw(pl perl pm)), # perhaps also 'cgi'\n> +       (map { $_ => 'make'} qw(make mak mk)),\n> +       (map { $_ => 'xml' } qw(xml xhtml html htm)),\n\nI think the patch itself looks OK, but:\n\n  1. It isn't formatted to apply with git-am. Please use\n     git-format-patch.\n\n  2. The commit message does not explain the reason for the change.\n\n  3. It isn't signed-off.\n\nThe first two are things I can fix up (though it is inconvenient for me\nto do so), but the third is a show-stopper.  Please look through\nDocumentation/SubmittingPatches, especially the bit about the\nDeveloper's Certificate of Origin, and re-send.\n\n-Peff\n"},{"id":"299189","messageId":"20121102104121.4f81a160e4e6368dde3a8373@lavabit.com","threadId":"31971","inReplyTo":"20121102145425.GC11170@sigill.intra.peff.net","subject":"Re: [PATCH] gitweb.perl: fix %highlight_ext","fromName":"rh","fromEmail":"richard_hubbe11@lavabit.com","sentAt":"2012-11-02T17:41:21Z","receivedAt":"2012-11-02T17:41:21Z","isPatch":true,"sender":{"key":"richard_hubbe11@lavabit.com","avatar":null},"body":"On Fri, 2 Nov 2012 10:54:25 -0400\nJeff King <peff@peff.net> wrote:\n\n> On Mon, Oct 29, 2012 at 09:42:07AM -0700, rh wrote:\n> \n> > I also consolidated exts where applicable.\n> > i.e. c and h maps to c\n> > \n> > \n> > -- \n> > \n> > diff --git a/a/gitweb.cgi b/b/gitweb.cgi\n> > index 060db27..155b238 100755\n> > --- a/a/gitweb.cgi\n> > +++ b/b/gitweb.cgi\n> > @@ -246,19 +246,19 @@ our %highlight_basename = (\n> >         'Makefile' => 'make',\n> >  );\n> >  # match by extension\n> > +\n> >  our %highlight_ext = (\n> >         # main extensions, defining name of syntax;\n> >         # see files in /usr/share/highlight/langDefs/ directory\n> > -       map { $_ => $_ }\n> > -               qw(py c cpp rb java css php sh pl js tex bib xml\n> > awk bat ini spec tcl sql make),\n> > +       (map { $_ => $_ } qw(py rb java css js tex bib xml awk bat\n> > ini spec tcl sql)),\n> >         # alternate extensions, see /etc/highlight/filetypes.conf\n> > -       'h' => 'c',\n> > -       map { $_ => 'sh'  } qw(bash zsh ksh),\n> > -       map { $_ => 'cpp' } qw(cxx c++ cc),\n> > -       map { $_ => 'php' } qw(php3 php4 php5 phps),\n> > -       map { $_ => 'pl'  } qw(perl pm), # perhaps also 'cgi'\n> > -       map { $_ => 'make'} qw(mak mk),\n> > -       map { $_ => 'xml' } qw(xhtml html htm),\n> > +       (map { $_ => 'c'   } qw(c h)),\n> > +       (map { $_ => 'sh'  } qw(sh bash zsh ksh)),\n> > +       (map { $_ => 'cpp' } qw(cpp cxx c++ cc)),\n> > +       (map { $_ => 'php' } qw(php php3 php4 php5 phps)),\n> > +       (map { $_ => 'pl'  } qw(pl perl pm)), # perhaps also 'cgi'\n> > +       (map { $_ => 'make'} qw(make mak mk)),\n> > +       (map { $_ => 'xml' } qw(xml xhtml html htm)),\n> \n> I think the patch itself looks OK, but:\n> \n>   1. It isn't formatted to apply with git-am. Please use\n>      git-format-patch.\n> \n>   2. The commit message does not explain the reason for the change.\n> \n>   3. It isn't signed-off.\n> \n> The first two are things I can fix up (though it is inconvenient for\n> me to do so), but the third is a show-stopper.  Please look through\n> Documentation/SubmittingPatches, especially the bit about the\n> Developer's Certificate of Origin, and re-send.\n> \n> -Peff\n\nThanks for taking the time to explain the workflow. If I can figure all this\nout I will try to do what's needed.  This is feeling like a strange cult\nthat I've bumped into!\n\n-- \n\"...she's got smarts and never farts and owns a chain of liquor stores.\"\n\n"},{"id":"299190","messageId":"20121102141809.caf5cbc07f08769fd6a302ad@lavabit.com","threadId":"31971","inReplyTo":"20121102145425.GC11170@sigill.intra.peff.net","subject":"Re: [PATCH] gitweb.perl: fix %highlight_ext","fromName":"rh","fromEmail":"richard_hubbe11@lavabit.com","sentAt":"2012-11-02T21:18:09Z","receivedAt":"2012-11-02T21:18:09Z","isPatch":true,"sender":{"key":"richard_hubbe11@lavabit.com","avatar":null},"body":"Peff and the Final Arbiter,\n\nOn Fri, 2 Nov 2012 10:54:25 -0400\nJeff King <peff@peff.net> wrote:\n\n> On Mon, Oct 29, 2012 at 09:42:07AM -0700, rh wrote:\n> \n> > I also consolidated exts where applicable.\n> > i.e. c and h maps to c\n> > \n> > \n> > -- \n> > \n> > diff --git a/a/gitweb.cgi b/b/gitweb.cgi\n> > index 060db27..155b238 100755\n> > --- a/a/gitweb.cgi\n> > +++ b/b/gitweb.cgi\n> > @@ -246,19 +246,19 @@ our %highlight_basename = (\n> >         'Makefile' => 'make',\n> >  );\n> >  # match by extension\n> > +\n> >  our %highlight_ext = (\n> >         # main extensions, defining name of syntax;\n> >         # see files in /usr/share/highlight/langDefs/ directory\n> > -       map { $_ => $_ }\n> > -               qw(py c cpp rb java css php sh pl js tex bib xml\n> > awk bat ini spec tcl sql make),\n> > +       (map { $_ => $_ } qw(py rb java css js tex bib xml awk bat\n> > ini spec tcl sql)),\n> >         # alternate extensions, see /etc/highlight/filetypes.conf\n> > -       'h' => 'c',\n> > -       map { $_ => 'sh'  } qw(bash zsh ksh),\n> > -       map { $_ => 'cpp' } qw(cxx c++ cc),\n> > -       map { $_ => 'php' } qw(php3 php4 php5 phps),\n> > -       map { $_ => 'pl'  } qw(perl pm), # perhaps also 'cgi'\n> > -       map { $_ => 'make'} qw(mak mk),\n> > -       map { $_ => 'xml' } qw(xhtml html htm),\n> > +       (map { $_ => 'c'   } qw(c h)),\n> > +       (map { $_ => 'sh'  } qw(sh bash zsh ksh)),\n> > +       (map { $_ => 'cpp' } qw(cpp cxx c++ cc)),\n> > +       (map { $_ => 'php' } qw(php php3 php4 php5 phps)),\n> > +       (map { $_ => 'pl'  } qw(pl perl pm)), # perhaps also 'cgi'\n> > +       (map { $_ => 'make'} qw(make mak mk)),\n> > +       (map { $_ => 'xml' } qw(xml xhtml html htm)),\n> \n> I think the patch itself looks OK, but:\n> \n>   1. It isn't formatted to apply with git-am. Please use\n>      git-format-patch.\n\ngit format-patch command wouldn't work for me. I can see that you\ndon't need more stuff to do but not knowing git I couldn't find the\ncorrect incantation to do this part. A problem with the files not\nbeing in a git repo I think. I'll spare you details.\n\n> \n>   2. The commit message does not explain the reason for the change.\n> \n>   3. It isn't signed-off.\n\nThese I've done and submitted the patch again. (even though format\nis probably not going to work with git-am.\n\n> \n> The first two are things I can fix up (though it is inconvenient for\n> me to do so), but the third is a show-stopper.  Please look through\n> Documentation/SubmittingPatches, especially the bit about the\n> Developer's Certificate of Origin, and re-send.\n> \n> -Peff\n\nThanks for your patience and help.\n\n"},{"id":"202514","messageId":"20121104134503.GB31623@sigill.intra.peff.net","threadId":"31971","inReplyTo":"20121102141809.caf5cbc07f08769fd6a302ad@lavabit.com","subject":"Re: [PATCH] gitweb.perl: fix %highlight_ext","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-11-04T13:45:03Z","receivedAt":"2012-11-04T13:45:03Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 02, 2012 at 02:18:09PM -0700, rh wrote:\n\n> > I think the patch itself looks OK, but:\n> > \n> >   1. It isn't formatted to apply with git-am. Please use\n> >      git-format-patch.\n> \n> git format-patch command wouldn't work for me. I can see that you\n> don't need more stuff to do but not knowing git I couldn't find the\n> correct incantation to do this part. A problem with the files not\n> being in a git repo I think. I'll spare you details.\n\nThe usual procedure is:\n\n  1. hack hack hack\n\n  2. git commit\n\n  3. git format-patch\n\nAnd if you are not in a git repo, step 0 is \"git init\". :)\n\n-Peff\n"},{"id":"299191","messageId":"20121104094309.d9d93e7e88e24d6d07be7cb0@lavabit.com","threadId":"31971","inReplyTo":"20121104134503.GB31623@sigill.intra.peff.net","subject":"Re: [PATCH] gitweb.perl: fix %highlight_ext","fromName":"rh","fromEmail":"richard_hubbe11@lavabit.com","sentAt":"2012-11-04T17:43:09Z","receivedAt":"2012-11-04T17:43:09Z","isPatch":true,"sender":{"key":"richard_hubbe11@lavabit.com","avatar":null},"body":"On Sun, 4 Nov 2012 08:45:03 -0500\nJeff King <peff@peff.net> wrote:\n\n> On Fri, Nov 02, 2012 at 02:18:09PM -0700, rh wrote:\n> \n> > > I think the patch itself looks OK, but:\n> > > \n> > >   1. It isn't formatted to apply with git-am. Please use\n> > >      git-format-patch.\n> > \n> > git format-patch command wouldn't work for me. I can see that you\n> > don't need more stuff to do but not knowing git I couldn't find the\n> > correct incantation to do this part. A problem with the files not\n> > being in a git repo I think. I'll spare you details.\n> \n> The usual procedure is:\n> \n>   1. hack hack hack\n> \n>   2. git commit\n> \n>   3. git format-patch\n\nRoger wilco.\n\n> \n> And if you are not in a git repo, step 0 is \"git init\". :)\n\nI had an inkling but nothing more.\n\nThanks again for the help!\n\n> \n> -Peff\n\n\n-- \n\n\n"}]}