commit:     3cded564f41736854cd41c6e5c2318f4a7351d7f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue May 28 02:26:23 2024 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Jun  7 15:02:43 2024 +0000
URL:        https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=3cded564

bin/merge-driver-ekeyword: Store merged output in correct location

Fixes: a667d93 ("bin/merge-driver-ekeyword: Look for KEYWORDS changes in 
upstream commit")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 bin/merge-driver-ekeyword | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bin/merge-driver-ekeyword b/bin/merge-driver-ekeyword
index 6d5f869..70c9b3a 100755
--- a/bin/merge-driver-ekeyword
+++ b/bin/merge-driver-ekeyword
@@ -11,6 +11,7 @@ See 
https://git-scm.com/docs/gitattributes#_defining_a_custom_merge_driver
 
 import difflib
 import os
+import shutil
 import sys
 import tempfile
 
@@ -128,6 +129,8 @@ def main(argv: Sequence[str]) -> int:
     elif changes := keyword_changes(O, A):
         # Apply %O -> %A changes to %B
         result = apply_keyword_changes(B, P, changes)
+        # Merged file should be left in %A
+        shutil.move(B, A)
         sys.exit(result)
     else:
         try:

Reply via email to