From: John Keeping Date: Sun, 14 Aug 2016 10:38:01 GMT Subject: Re: git-mergetool reverse file ordering Message-ID: <20160814103801.tpixnskdsf5ycj66@john.keeping.me.uk> In-Reply-To: <20160814034221.GB21057@gmail.com> On Sat, Aug 13, 2016 at 08:42:21PM -0700, David Aguilar wrote: > This use case makes me wonder whether the sorting we do here is > something that should be opened up a bit so that the it's not > quite so set in stone. > > For example, an extension to the approach taken by this patch > would be to have `mergetool.reverseOrder` git config boolean > option that would tell us whether or not to use the "-r" flag > when calling sort. > > But, IMO that is too rigid, and only addresses this narrow use > case. What if users want a case-insensitive sort, or some other > preferred ordering? > > We can address these concerns, and your use case, by opening it > up. Something like, > > sort=$(git config mergetool.sort || echo sort -u) Why not reuse the existing diff.orderFile config variable? (Also supported by the -O option to git-diff).