Re: git-mergetool reverse file ordering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 17.08.2016 um 08:05 schrieb Johannes Sixt:
Am 17.08.2016 um 03:25 schrieb David Aguilar:
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.

Instead of using 'git ls-files -u | sed ... | sort -u' you could use

  git diff-files --name-status -O... | sed -ne '/^U/s/^..//p'

Or even better:

    git diff-files --name-only --diff-filter=U -O...


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.

I don't think that we need a new filter when the diff machinery is
capable of re-ordering files. We should enhance the diff machinery instead.

-- Hannes


--
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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]