From: Samuel GROOT Date: Wed, 08 Jun 2016 16:46:59 GMT Subject: Re: [PATCH v3 1/6] t9001: non order-sensitive file comparison Message-ID: <3090c61c-533b-7119-f5e4-7d99e62f6da4@grenoble-inp.org> In-Reply-To: On 06/08/2016 06:09 PM, Junio C Hamano wrote: > Samuel GROOT writes: > >> Actually we had issues when trying to refactor send-email's email >> parsing loop [1]. Email addresses in output file `commandeline1` in >> tests weren't sorted the same way as the reference file it was >> compared to. E.g.: >> >> !nobody@example.com! >> !author@example.com! >> !one@example.com! >> !two@example.com! > > And the reason why these addresses that are collected from the same > input (i.e. command line, existing e-mail fields, footers, etc.) are > shown in different order in your implementation is...? It's not shown in different order in our implementation, it's just a leftover of my refactor attempt [1]. Maybe it's a bad idea to increase tests' complexity, but IMHO tests should be independent to the addresses' order. Plus, it would help refactor in the future, the data being processed differently: parsing and processing in different subroutines rather than doing everything in one gigantic loop. We can drop it if necessary, but it may be useful to make git-send-email.perl easier to maintain. [1] * http://article.gmane.org/gmane.comp.version-control.git/295753