git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fahad Ashfaque <fahadash@gmail.com>
To: git@vger.kernel.org
Subject: Cannot set the commit-message editor
Date: Fri, 21 Nov 2014 10:57:17 -0500	[thread overview]
Message-ID: <CAOmRNZ4uJEoxroyCRUSDwSC3OAMKTSO0s91_uFDaUit3k8eJLg@mail.gmail.com> (raw)

I have downloaded the latest git from git-scm on my windows machine.

I am using git on windows, I am having trouble trying to get notepad++
as my commit message editor.

I have created a shell script called npp.sh which has the following content

/c/Program\ Files\ \(x86\)/Notepad++/notepad++.exe -multiInst
-nosession -noPlugin $1


I figured this is how paths are accepted in git-bash

Now I configured core.editor this way

git config --global core.editor /c/path/to/npp.sh


when I try to commit, using the following command

git commit

I get the following error
$ git commit
error: cannot spawn c:/path/to/npp.sh: No such file or directory
error: unable to start editor 'c:/dev/tools/cmd/npp.sh'
Please supply the message using either -m or -F option.

when I run the following command

ls c:/

I get the directory for my repository's root, not C drive's root

When I run the following command through git-bash

/c/path/to/npp.sh

It works

but when git commit invokes, it does not.

Here is more of what I found

when 'git commit' launches npp.sh, it changes /c/path/to/npp.sh to
c:/path/to/npp.sh

c:/ is not the root of my C drive according to git-bash, c:/ is root
of my repository because when I run 'ls c:/' I get files from root of
my repository.

so may be if 'git commit' does not change /c/path/to/npp.sh to
c:/path/to/npp.sh, it would work... Or if git-bash does not mount c:/
to /c/path/to/myrepository and keep it to /c it would work too.

Please let me know if you need more info on this

Thanks

Fahad

             reply	other threads:[~2014-11-21 15:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 15:57 Fahad Ashfaque [this message]
2014-11-21 17:48 ` Cannot set the commit-message editor Philip Oakley
2014-11-21 19:51   ` Fahad Ashfaque
2014-11-21 21:14     ` Philip Oakley

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=CAOmRNZ4uJEoxroyCRUSDwSC3OAMKTSO0s91_uFDaUit3k8eJLg@mail.gmail.com \
    --to=fahadash@gmail.com \
    --cc=git@vger.kernel.org \
    /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).