# RFE: merge driver without overwrite

1 messages from 2018-12-27 to 2018-12-27. Participants: H. Peter Anvin.
Thread: https://gitlist.dev/t/50120

## H. Peter Anvin, 2018-12-27 20:21

Subject: RFE: merge driver without overwrite
Message-ID: <c3ad1c9b-86a6-2c51-8147-991ecbac1885@zytor.com>
URL: https://gitlist.dev/e/c3ad1c9b-86a6-2c51-8147-991ecbac1885%40zytor.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

```
