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

Re: What's cooking in git.git (Jan 2009, #07; Wed, 28)

From
Charles Bailey <charles@hashpling.org>
Date
Jan 29, 2009, 09:16 UTC
Message-ID
<20090129091611.GB10490@hashpling.org>
In-Reply-To
<7vbptqh60w.fsf@gitster.siamese.dyndns.org>
On Thu, Jan 29, 2009 at 12:26:39AM -0800, Junio C Hamano wrote:
Show 15 quoted lines
> Charles Bailey <charles@hashpling.org> writes:
> 
> > On Wed, Jan 28, 2009 at 06:06:45PM -0800, Junio C Hamano wrote:
> >> * cb/mergetool (Wed Jan 21 22:57:48 2009 +0000) 1 commit
> >>  + mergetool: respect autocrlf by using checkout-index
> >> 
> >
> > Can you hold off on merging this one? I now think that there's a
> > cleaner way of doing this and I would like the opportunity for a
> > rethink.
> 
> Sure, it is not in 'master' yet.
> 
> But it's in 'next', so incremental updates from now on, please.
> 
OK, I've thought again and I still think that this patch is good.
Just so you know what I was thinking...

I felt that the new shell function that calls git checkout-index was a bit clunky. git checkout-index --temp creates its own temporary file and then the git mergetool renames this file to the temporary filename that it had already decided on.

An earlier patch to mergetool was careful to ensure that mergetool temporaries maintained the file extension of the target file in order to help syntax highlighting merge tools. For this reason, just using checkout-index generated filenames is not a sufficient solution.

I had two ideas, the first was that perhaps git mergetool could choose a temporary naming scheme that could be matched by the appropriate use of checkout-index --prefix. This would obviously preserve the file extension but it's fairly obvious that it would have surprising behaviour for merging files in subfolders.

My last idea would be to add an explicit --to-path= to git checkout-index. It would make the mergetool code simpler but I'm not sure how useful it would be in any other circumstance.

-- 
Charles Bailey
http://ccgi.hashpling.plus.com/blog/
Previous: Junio C HamanoNext: Charles Bailey
Message 27 of 30 in “What's cooking in git.git (Jan 2009, #07; Wed, 28)”
  1. Junio C HamanoJan 29, 2009
  2. Jeff KingJan 29, 2009
  3. Jeff KingJan 29, 2009
  4. Jeff KingJan 29, 2009
  5. Junio C HamanoJan 29, 2009
  6. Sverre RabbelierJan 29, 2009
  7. Jeff KingJan 29, 2009
  8. Pieter de BieJan 29, 2009
  9. Sverre RabbelierJan 29, 2009
  10. Jeff KingJan 29, 2009
  11. Sverre RabbelierJan 29, 2009
  12. Jeff KingJan 30, 2009
  13. Johannes SchindelinJan 30, 2009
  14. Jeff KingJan 30, 2009
  15. Junio C HamanoFeb 1, 2009
  16. Junio C HamanoFeb 12, 2009
  17. Sverre RabbelierFeb 12, 2009
  18. Johannes SchindelinFeb 12, 2009
  19. Junio C HamanoFeb 12, 2009
  20. Johannes SchindelinFeb 12, 2009
  21. Jeff KingFeb 12, 2009
  22. Jeff KingJan 29, 2009
  23. Nico -telmich- SchotteliusJan 29, 2009
  24. Jeff KingJan 30, 2009
  25. Charles BaileyJan 29, 2009
  26. Junio C HamanoJan 29, 2009
  27. Charles BaileyJan 29, 2009
  28. Charles BaileyJan 30, 2009
  29. Kirill SmelkovFeb 1, 2009
  30. Junio C HamanoFeb 1, 2009

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.