git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* RFE: merge driver without overwrite
@ 2018-12-27 20:21 H. Peter Anvin
  0 siblings, 0 replies; only message in thread
From: H. Peter Anvin @ 2018-12-27 20:21 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-27 20:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 20:21 RFE: merge driver without overwrite H. Peter Anvin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).