Page 1 of 1

AkelPad as a GIT commit editor

Posted: Wed Sep 30, 2015 3:51 pm
by Nova
Hello,

I'm using AkelPAD from a couple of days, and I like it very much.
Nonetheless, I have a (small) problem: using AkelPad as the default editor for the GIT commits, it does not open the correct commit file; it opens a blnk file, asking the user the permission to create it (??!)

Any idea on how to fix this?
Thank you in advance!

Posted: Wed Sep 30, 2015 6:43 pm
by Skif_off
Nova
Maybe length of full name (path/filename) is more MAX_PATH (260 characters)?

P.S. If it's true, you can try use subst.

Add:
How you are added AkelPad? Step by step. Maybe mistake in commandline for AkelPad?

Posted: Thu Oct 01, 2015 7:46 am
by Nova
Thank you for your reply.

The path length is not an issue: i tried with a "short pathname" as well, and I have the same problem.

I tried configuring AkelPad either as a notepad replacement (using the method described in here here), or using it directly as GIT core.editor, as described url=http://git-scm.com/book/it/v2/Customizi ... figuration]in here[/url].

Actually, GIT creates a COMMIT_EDITMSG file inside its ".git" folder, and tries to open that one....

Posted: Thu Oct 01, 2015 8:40 am
by DV
What is the full path name to the file COMMIT_EDITMSG?
And, if you look at the system properties of the folder which contains this file, are you sure that you (your user) have "Full control" and "Modify" allowed under the Security tab?

Posted: Thu Oct 01, 2015 8:52 am
by Nova
The path to the file is:

<MyProject>\.git\COMMIT_EDITMSG

In my situation, for testing, I'm using this:

D:\Tmp\TEST\.git\COMMIT_EDITMSG

I noticed I did NOT had full permissions on the folder, but I tried granting full control and modify, and nothing changed.

In particular, I get an error like this:

Create new file "D:\Tmp\TEST"?

Posted: Thu Oct 01, 2015 10:57 am
by Skif_off
Nova
Show file C:\Users\%USERNAME%\.gitconfig please.

Posted: Thu Oct 01, 2015 11:43 am
by Skif_off
Huh, Git uses slash "/", but AkelPad waits backslash "\" in commandline.

Parameter /x solves problem, but I don't know how to add its in commandline.

Posted: Thu Oct 01, 2015 11:58 am
by Nova
Hello, my .gitconfig contains:

[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
editor = D:/tools/akelpad.exe

Posted: Thu Oct 01, 2015 12:07 pm
by Skif_off
Wow, it's so easy:

Code: Select all

git config --global core.editor "D:/tools/AkelPad.cmd"
or edit .gitconfig:

Code: Select all

editor = \"D:/tools/AkelPad.cmd\"
And

Code: Select all

%~dp0AkelPad.exe /x %1

Posted: Thu Oct 01, 2015 12:19 pm
by Nova
WOW!!

Thank you very much! This is working fine :D :D

Thanks again.

Posted: Thu Oct 01, 2015 12:31 pm
by Instructor
Why not just add "/x" to "CmdLineBegin" manual parameter?

Posted: Thu Oct 01, 2015 1:03 pm
by Skif_off
Instructor
Yes, "CmdLineBegin" is a more simple solution, but command line by default without "/x" and I find it difficult to assess the implications.