{"thread":{"id":"50120","subject":"RFE: merge driver without overwrite","startedAt":"2018-12-27T20:22:05Z","lastAt":"2018-12-27T20:22:05Z","messageCount":1,"participants":["H. Peter Anvin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"365882","messageId":"c3ad1c9b-86a6-2c51-8147-991ecbac1885@zytor.com","threadId":"50120","inReplyTo":null,"subject":"RFE: merge driver without overwrite","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2018-12-27T20:21:55Z","receivedAt":"2018-12-27T20:22:05Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"The current definition for merge drivers require the output file %A to be\noverwritten. When using a pipeline of Unix commands, this often results in %A\nbeing truncated too early, requiring the user to add a temporary file managed\nexplicitly.\n\nIt would be far preferable if git could manage this; perhaps an %N marker for\na temporary filename, which, if given, is treated as the output; notionally:\n\n\tif [ $? -eq 0 -a -f %N ]; then mv -f %N %A; else rm -f %N; fi\n\n\t-hpa\n"}]}