git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Frank Li <lznuaa@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: question about COMMIT_EDITMSG crlf
Date: Wed, 14 Jan 2009 08:18:38 +0100	[thread overview]
Message-ID: <496D91CE.1000504@viscovery.net> (raw)
In-Reply-To: <1976ea660901132117l7947157fw2922465a9b3945dc@mail.gmail.com>

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

  parent reply	other threads:[~2009-01-14  7:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14  5:17 question about COMMIT_EDITMSG crlf Frank Li
2009-01-14  7:04 ` Junio C Hamano
2009-01-14  7:18 ` Johannes Sixt [this message]
2009-01-14  9:01   ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=496D91CE.1000504@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=lznuaa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).