threads / discuss / 50120

RFE: merge driver without overwrite

Subject: RFE: merge driver without overwrite

## tl;dr

One message between Dec 27, 2018 and Dec 27, 2018.

replies: 0people: 1as markdown or json

H. Peter Anvin· Dec 27, 2018, 20:21 UTC · lore

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

← back to recent threads