Re: question about COMMIT_EDITMSG crlf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Frank Li schrieb:
> I want to use notepad replace default vim at commit message editor.
> git commit will create COMMIT_EDITMSG at .git directory. This file is
> unix text mode.
> Is there any config change it to windows text mode?

No, there isn't. But perhaps you can use WordPad instead of Notepad? There
are reports that this worked.

You could also write a wrapper script that transforms the file before it
calls Notepad on it (untested):

   #!/bin/bash
   sed -e $'s/\r?$/\r/' < "$1" > .git/tmp$$ &&
   mv .git/tmp$$ "$1" &&
   notepad "$1"

I think git commit removes the trailing CRs automatically, so they don't
end up in the commit message.

-- Hannes

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux