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

Re: [PATCH v3] diff: generate prettier filenames when using GIT_EXTERNAL_DIFF

From
David Aguilar <davvid@gmail.com>
Date
May 26, 2009, 20:52 UTC
Message-ID
<20090526205230.GA66544@gmail.com>
In-Reply-To
<200905262231.50892.markus.heidelberg@web.de>
On Tue, May 26, 2009 at 10:31:50PM +0200, Markus Heidelberg wrote:
Show 11 quoted lines
> David Aguilar, 26.05.2009:
> > Diffing "name.ext" now generates "name.XXXX.ext".
> > Diffing files with no extension now generates "name_XXXX".
> 
> Would it simplify the patch when using "name_XXXX.ext" and "name_XXXX"?
> Or what about "XXXX_name.ext" and "XXXX_name"? Then you don't even have
> to search for the dot and it has the advantage to show the original
> filename without some random letters in the middle of it.
> 
> Markus
> 

In that case suffix_len is always len(basename) + 1 and there's less strbuf juggling to do. That is simpler. Let's do that.

My next patch series will be two parts: part 1: add compat/mkstemps.c part 2: use it in prep_temp_blob() via git_mkstemps()

Part 1 has me a little nervous because I'm not sure which
platforms in the Makefile need the
	NO_MKSTEMPS = YesPlease
setting.  I only have access to mac + linux, so I can do the
right thing there, but I'll have to make a best guess for the
rest of the platforms.

Perhaps the best answer is to set them all to YesPlease except for mac and openbsd, which I know have native implementations.

-- 
		David
Previous: Markus HeidelbergNext: Junio C Hamano
Message 6 of 7 in “diff: generate prettier filenames when using GIT_EXTERNAL_DIFF”
  1. diff: generate prettier filenames when using GIT_EXTERNAL_DIFFDavid Aguilar, May 26, 2009
  2. Stephen BoydMay 26, 2009
  3. David AguilarMay 26, 2009
  4. Junio C HamanoMay 26, 2009
  5. Markus HeidelbergMay 26, 2009
  6. David AguilarMay 26, 2009
  7. Junio C HamanoMay 26, 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.