{"thread":{"id":"17164","subject":"question about COMMIT_EDITMSG crlf","startedAt":"2009-01-14T05:17:19Z","lastAt":"2009-01-14T09:01:44Z","messageCount":4,"participants":["Frank Li","Junio C Hamano","Johannes Sixt","Juanma Barranquero"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"100363","messageId":"1976ea660901132117l7947157fw2922465a9b3945dc@mail.gmail.com","threadId":"17164","inReplyTo":null,"subject":"question about COMMIT_EDITMSG crlf","fromName":"Frank Li","fromEmail":"lznuaa@gmail.com","sentAt":"2009-01-14T05:17:19Z","receivedAt":"2009-01-14T05:17:19Z","isPatch":false,"sender":{"key":"lznuaa@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40642?v=4"},"body":"I want to use notepad replace default vim at commit message editor.\ngit commit will create COMMIT_EDITMSG at .git directory. This file is\nunix text mode.\nIs there any config change it to windows text mode?\n"},{"id":"100372","messageId":"7vr6365px1.fsf@gitster.siamese.dyndns.org","threadId":"17164","inReplyTo":"1976ea660901132117l7947157fw2922465a9b3945dc@mail.gmail.com","subject":"Re: question about COMMIT_EDITMSG crlf","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-01-14T07:04:42Z","receivedAt":"2009-01-14T07:04:42Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Frank Li\" <lznuaa@gmail.com> writes:\n\n> I want to use notepad replace default vim at commit message editor.\n> git commit will create COMMIT_EDITMSG at .git directory. This file is\n> unix text mode.\n> Is there any config change it to windows text mode?\n\nNothing I can think of, other than using customized commit templates,\nwhich I suspect is a bit overkill and at the same time misses the point\nfor this use case.\n"},{"id":"100373","messageId":"496D91CE.1000504@viscovery.net","threadId":"17164","inReplyTo":"1976ea660901132117l7947157fw2922465a9b3945dc@mail.gmail.com","subject":"Re: question about COMMIT_EDITMSG crlf","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2009-01-14T07:18:38Z","receivedAt":"2009-01-14T07:18:38Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Frank Li schrieb:\n> I want to use notepad replace default vim at commit message editor.\n> git commit will create COMMIT_EDITMSG at .git directory. This file is\n> unix text mode.\n> Is there any config change it to windows text mode?\n\nNo, there isn't. But perhaps you can use WordPad instead of Notepad? There\nare reports that this worked.\n\nYou could also write a wrapper script that transforms the file before it\ncalls Notepad on it (untested):\n\n   #!/bin/bash\n   sed -e $'s/\\r?$/\\r/' < \"$1\" > .git/tmp$$ &&\n   mv .git/tmp$$ \"$1\" &&\n   notepad \"$1\"\n\nI think git commit removes the trailing CRs automatically, so they don't\nend up in the commit message.\n\n-- Hannes\n"},{"id":"100386","messageId":"f7ccd24b0901140101k1e0ca6aan1dbba537461a271a@mail.gmail.com","threadId":"17164","inReplyTo":"496D91CE.1000504@viscovery.net","subject":"Re: question about COMMIT_EDITMSG crlf","fromName":"Juanma Barranquero","fromEmail":"lekktu@gmail.com","sentAt":"2009-01-14T09:01:44Z","receivedAt":"2009-01-14T09:01:44Z","isPatch":false,"sender":{"key":"lekktu@gmail.com","avatar":"https://gravatar.com/avatar/f125831a3413d11820fd7d62de71ccdf207793b61381e7b7d83d5a73fbf5e7ff?d=mp&s=160"},"body":"On Wed, Jan 14, 2009 at 08:18, Johannes Sixt <j.sixt@viscovery.net> wrote:\n\n> No, there isn't. But perhaps you can use WordPad instead of Notepad? There\n> are reports that this worked.\n\nOr Notepad2:\n\nhttp://www.flos-freeware.ch/notepad2.html\n\n    Juanma\n"}]}