From: Junio C Hamano Date: Tue, 22 Oct 2019 11:34:24 GMT Subject: Re: [RFC PATCH 1/7] Makefile: alphabetically sort += lists Message-ID: In-Reply-To: <20191021195413.GB3959@sigill.intra.peff.net> Jeff King writes: >> ... >> I agree with you that it did correctly sort them in ASCII order. > > What's the purpose of sorting them, though? I thought it was less for > aesthetics and more to to keep lines deterministic (to avoid two > branches adding the same line in different places, thus causing > weirdness when the two are merged). In that case, I think we care less > about the exact order and more that anybody can easily reproduce the > same sort (by running "10:!sort" or whatever you weird emacs-types would > type). In the ideal world, "sort" would have a handy option we can tell it to reshuffle the ASCII table in such a way that all punctuations come before alphanumeric, making sure "/" and "." are the first two letters in the alphabet, and everybody can use it to sort the lines reproducibly and also readably. But I do not know of such a widely used implementation of "sort", so... If we had known better, we would have used such a custom sort order to sort the index entries, making sure that slash sorts before any other byte ;-)