From: David Aguilar <davvid@gmail.com>
To: Luis Gutierrez <luisgutz@gmail.com>
Cc: John Keeping <john@keeping.me.uk>, git@vger.kernel.org
Subject: Re: git-mergetool reverse file ordering
Date: Tue, 16 Aug 2016 18:25:54 -0700 [thread overview]
Message-ID: <20160817012554.GA12991@gmail.com> (raw)
In-Reply-To: <CAD8hE_xR2mB3=_oot9cWxmFy7z4oBhjABNOo3aJKN=bOw5ybzQ@mail.gmail.com>
On Mon, Aug 15, 2016 at 09:19:35PM +0100, Luis Gutierrez wrote:
> > Thoughts? Would you be interested in helping work up a patch
> > for this idea? At a minimum we should also write a test case in
> > t/t7610-mergetool.sh to verify that it works as advertised.
> ....
> > Why not reuse the existing diff.orderFile config variable? (Also
> > supported by the -O option to git-diff).
>
>
> I'll be happy to write a testcase, and to re-use the -O
> (diff.orderFile config var) option to git-diff as sugguested by John
> Keeping.
>
> Is this the final spec?
>
>
>
> I'll be happy to do that.
>
> Luis
Hmm, I do like the idea of reusing the diff orderFile, but a
mechanism for sorting arbitrary inputs based on the orderFile
isn't currently exposed in a way that mergetool could use it.
Looking at the code in mergetool, we basically need something
that has the same spec as "sort" itself, namely that it can take
arbitrary arbitrary input on stdin and sort it.
Implementing the orderFile support would probably be best done
in C. Would we want to expose it as an internal helper?
e.g.
git diff--order-helper <order-file>
could be used to perform the sorting.
But, that sort is honestly kinda crude. It can't implement the
interesting case where we want bar.h to sort before bar.c but
not foo.h.
If we did the sort option, we could have both.
Thoughts?
--
David
next prev parent reply other threads:[~2016-08-17 1:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 10:14 git-mergetool reverse file ordering Luis Gutierrez
2016-08-14 3:42 ` David Aguilar
2016-08-14 10:38 ` John Keeping
2016-08-15 20:19 ` Luis Gutierrez
2016-08-17 1:25 ` David Aguilar [this message]
2016-08-17 6:05 ` Johannes Sixt
2016-08-17 6:10 ` Johannes Sixt
2016-08-17 6:46 ` David Aguilar
2016-08-17 7:35 ` Johannes Sixt
2016-08-17 21:18 ` David Aguilar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160817012554.GA12991@gmail.com \
--to=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=john@keeping.me.uk \
--cc=luisgutz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).