git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* question about COMMIT_EDITMSG crlf
@ 2009-01-14  5:17 Frank Li
  2009-01-14  7:04 ` Junio C Hamano
  2009-01-14  7:18 ` Johannes Sixt
  0 siblings, 2 replies; 4+ messages in thread
From: Frank Li @ 2009-01-14  5:17 UTC (permalink / raw)
  To: git

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?

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

* Re: question about COMMIT_EDITMSG crlf
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2009-01-14  7:04 UTC (permalink / raw)
  To: Frank Li; +Cc: git

"Frank Li" <lznuaa@gmail.com> writes:

> 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?

Nothing I can think of, other than using customized commit templates,
which I suspect is a bit overkill and at the same time misses the point
for this use case.

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

* Re: question about COMMIT_EDITMSG crlf
  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
  2009-01-14  9:01   ` Juanma Barranquero
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Sixt @ 2009-01-14  7:18 UTC (permalink / raw)
  To: Frank Li; +Cc: git

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

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

* Re: question about COMMIT_EDITMSG crlf
  2009-01-14  7:18 ` Johannes Sixt
@ 2009-01-14  9:01   ` Juanma Barranquero
  0 siblings, 0 replies; 4+ messages in thread
From: Juanma Barranquero @ 2009-01-14  9:01 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: Frank Li, git

On Wed, Jan 14, 2009 at 08:18, Johannes Sixt <j.sixt@viscovery.net> wrote:

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

Or Notepad2:

http://www.flos-freeware.ch/notepad2.html

    Juanma

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

end of thread, other threads:[~2009-01-14  9:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-01-14  9:01   ` Juanma Barranquero

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).