All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] git-p4: fix crlf handling for utf16 files on Windows
@ 2022-07-20  5:27 Moritz Baumann via GitGitGadget
  2022-07-20 16:08 ` Junio C Hamano
  2022-07-20 18:17 ` [PATCH v2] git-p4: fix CR LF handling for utf16 files Moritz Baumann via GitGitGadget
  0 siblings, 2 replies; 6+ messages in thread
From: Moritz Baumann via GitGitGadget @ 2022-07-20  5:27 UTC (permalink / raw)
  To: git; +Cc: Tao Klerks, Junio C Hamano, Moritz Baumann, Moritz Baumann

From: Moritz Baumann <moritz.baumann@sap.com>

Signed-off-by: Moritz Baumann <moritz.baumann@sap.com>
---
    git-p4: fix crlf handling for utf16 files on Windows
    
    Signed-off-by: Moritz Baumann moritz.baumann@sap.com

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1294%2Fmbs-c%2Ffix-crlf-conversion-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1294/mbs-c/fix-crlf-conversion-v1
Pull-Request: https://github.com/git/git/pull/1294

 git-p4.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-p4.py b/git-p4.py
index 8fbf6eb1fe3..0a9d7e2ed7c 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -3148,7 +3148,7 @@ class P4Sync(Command, P4UserMap):
                     raise e
             else:
                 if p4_version_string().find('/NT') >= 0:
-                    text = text.replace(b'\r\n', b'\n')
+                    text = text.replace(b'\x0d\x00\x0a\x00', b'\x0a\x00')
                 contents = [text]
 
         if type_base == "apple":

base-commit: bbea4dcf42b28eb7ce64a6306cdde875ae5d09ca
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-20 18:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20  5:27 [PATCH] git-p4: fix crlf handling for utf16 files on Windows Moritz Baumann via GitGitGadget
2022-07-20 16:08 ` Junio C Hamano
2022-07-20 16:32   ` Baumann, Moritz
2022-07-20 17:18     ` Junio C Hamano
2022-07-20 18:17 ` [PATCH v2] git-p4: fix CR LF handling for utf16 files Moritz Baumann via GitGitGadget
2022-07-20 18:42   ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.