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

RFE: merge driver without overwrite

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Dec 27, 2018, 20:21 UTC
Message-ID
<c3ad1c9b-86a6-2c51-8147-991ecbac1885@zytor.com>

The current definition for merge drivers require the output file %A to be overwritten. When using a pipeline of Unix commands, this often results in %A being truncated too early, requiring the user to add a temporary file managed explicitly.

It would be far preferable if git could manage this; perhaps an %N marker for a temporary filename, which, if given, is treated as the output; notionally:

	if [ $? -eq 0 -a -f %N ]; then mv -f %N %A; else rm -f %N; fi
	-hpa
Message 1 of 1 in “RFE: merge driver without overwrite”
  1. H. Peter AnvinDec 27, 2018

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.