git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-mergetool reverse file ordering

From
Johannes Sixt <j6t@kdbg.org>
Date
Aug 17, 2016, 06:10 UTC
Message-ID
<882f5f1d-19a6-7b4b-7c6a-7347981fee72@kdbg.org>
In-Reply-To
<18a1ef52-1c5b-4f0a-5da2-777e816a1e3e@kdbg.org>
Am 17.08.2016 um 08:05 schrieb Johannes Sixt:
Show 8 quoted lines
> 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...
Show 12 quoted lines
>
>> 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
>
Previous: Johannes SixtNext: David Aguilar
Message 7 of 10 in “git-mergetool reverse file ordering”
  1. Luis GutierrezJul 27, 2016
  2. David AguilarAug 14, 2016
  3. John KeepingAug 14, 2016
  4. Luis GutierrezAug 15, 2016
  5. David AguilarAug 17, 2016
  6. Johannes SixtAug 17, 2016
  7. Johannes SixtAug 17, 2016
  8. David AguilarAug 17, 2016
  9. Johannes SixtAug 17, 2016
  10. David AguilarAug 17, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.