Am 25.02.20 um 16:24 schrieb Christopher Schultz: > Felix, > > On 2/25/20 04:22, Felix Schumacher wrote: > > Am 24.02.2020 22:13, schrieb Christopher Schultz: Mark, > > > On 2/24/20 15:46, Mark Thomas wrote: > >>>> On 24/02/2020 20:31, Christopher Schultz wrote: > >>>>> Mark, > >>>> > >>>>> Why not use the full commit id instead of a prefix? > >>>>> Couldn't some future commit conflict with some arbitrary > >>>>> prefix? Or do I not know what the hell I'm talking about? > >>>> > >>>> No, you are spot on. The reason I used the prefix is that I > >>>> was transcribing the commit IDs by hand so the prefixes were > >>>> easier. We probably should use the full ID or at least a > >>>> longer prefix. > > > I wonder if we could script this: grab a prefix, find the (one and > > only one) commit in the repo and expand it. If there is a conflict > > (or more than one match), emit an error and continue without > > changing the commit id. > > > When I do this kind of thing for $work, I like to write scripts > > that emit sed scripts. So you process e.g. security-8.html as > > input, but emit something like this as output: > > > s/(\b)69c5608(\b)/\169c56080fb3355507e1b55d014ec0ee6767a6150\2/g > > ... > > > You get a script that can be inspected, re-used and, even better, > > it doesn't directly modify the input files. So you can even do > > something like this: > > > $ expand-git-commit-ids.pl security-*.xml > expand.sed > > > $ sed -i .bak -f expand.sed security-*.xml > > > And then if you find other files where the same kind of thing needs > > to be done, you can re-use the expand.sed script, or even (pun > > intended) expand the sed script if necessary. > > >> I would use the full hash in the xml and use a substring-function > >> in the xsl to shorten the hash for readability. > > >> No need for sed here :) > > This was to initially fetch the full hashes. In the XML, now, they are > already shortened. See my other mail :) > > -chris > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org >
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org