-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 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. - -chris -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl5VPDUACgkQHPApP6U8 pFiOxQ/+K+R+H49bxxvq9Ly9fmyOJN/Q8VHG5Tx8Wj9zT890j1Dc8g+BvCIFxVCw 8ZUrl7P5kcQJh8M4UJ0InwmdFTPvZoQi8+Dks2WFztWTmiJH5yNxYFWFroV/hNRe PPns6wlgLg7juNB2C3HuVThlLGOL3wK3esxb1m7ufklTHAfWr1wywxOZhyfVnzWU e/On217dnVn4rnVCXGrAVix6noCyLz98ZaHVX3PQgNToN50hQDVxqA/pMgb3hX// izZg6Na3P8XNXtz1JWaU+I5cLnOH4D+ce9YXxeBiCZKH9D6EbMa99pdfFHm+Pn54 Sip0p5shv3VPETzOtR1e4ZrdG7QM5Yrdl6yjryhBq4fz4ktsE10fQG7NzGrPgElk Rz0cRbMZBhJmCs81FSvwpOlExiRlDsB5AR+ZnPJ0H3ptuBIkjOnF/JieTJseTc0l ybSyMa6J40xbco5YdLNYhgXozE8mxXpiLdvJPG4P4gnUUyQ2n2cUSmKfcUY1tJk6 XHs/iQWoRQEDaM/lSjTrHz70DOEKyw2hzWmrJhz2C7nA3Oo7+KXCTWMjq5rbj/jh HWt92/irSKTy4SQy8XvFNesOcRSkRxlvriWTy0iAgebpvYnaLecYnVAFcGy8RhYI Amq5+2X+D50+TL+0IyaWHdm3803jORI/K4/tQDvKK1i5X6eWxt8= =MAUE -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org