On Thu, 19 July 2007, Junio C Hamano wrote: > Jakub Narebski <jnareb@xxxxxxxxx> writes: > >> On Tue, 17 July 2007, Matt McCutchen napisał: >> ... >>> Alert for gitweb site administrators: This patch changes the format of >>> $feature{'snapshot'}{'default'} in gitweb_config.perl from a list of >>> three pieces of information about a single format to a list of one or >>> more formats you wish to offer from the set ('tgz', 'tbz2', 'zip'). >>> Update your gitweb_config.perl appropriately. The preferred names for >>> gitweb.snapshot in repository configuration have also changed from >>> 'gzip' and 'bzip2' to 'tgz' and 'tbz2', but the old names are still >>> recognized for compatibility. >> >> This alert/warning should probably be put in RelNotes for when it would >> be in git.git > > Does anybody else worry about the backward imcompatibility, I > wonder... List? > > I really hate to having to say something like that in the > RelNotes. I do not think this is a good enough reason to break > existing configurations; I would not want to be defending that > change. [...] > I am wondering if something like this patch (totally untested, > mind you) to convert the old style %feature in configuration at > the site at runtime would be sufficient. Would it be sufficient to put above alert/warning in commit message, RelNotes and gitweb/INSTALL (or gitweb/README), and add rule to Makefile to convert old configuration, or at least check if GITWEB_CONFIG uses old snapshot configuration? This way if somebody is installing/upgrading gitweb by hand he/she would know what needs possibly to be changes, and if somebody uses "make gitweb/gitweb.cgi" he would get big fat warning, and info how to convert gitweb config. By the way, I think it was a mistake to use different syntax in the %feature hash ([content-encoding, suffix, program]) than in repo config override (name). Besides the proposed patch incurs performance penalty for all feature checks, not only for snapshot. I think it could be solved by using a hack of providing more aliases, so that 'gzip' (repo config) but also 'x-gzip', 'gz' and 'gzip' (gitweb config) would be aliases to 'tgz' snapshot, and we would perform "uniq" on the list of snapshot formats (assuming it is sorted). Or make 'x-gzip' and 'gz' aliases into undef, so 'gzip' from old configuration would be aliased to the new format name 'tgz'. What do you think about this? Ooops, this has disadvantage of having to guess what could be put in the gitweb config regarding snapshot configuration, but I think we could assume that only the values enumerated in the old feature_snapshot would be used. All said, I think it is a good change. I guess that gitweb admins would want to provide both tgz/tar.gz archives for the Unix crowd, and zip archives for MS Windows users... P.S. I wonder why git-archive does not support tgz format. Git is linked to zlib, so... -- Jakub Narebski Poland - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html