AkelPad as a GIT commit editor

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 6
Joined: Wed Sep 30, 2015 3:48 pm

AkelPad as a GIT commit editor

Post 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!

Offline
Posts: 1162
Joined: Sun Oct 20, 2013 11:44 am

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

Offline
Posts: 6
Joined: Wed Sep 30, 2015 3:48 pm

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

DV
Offline
Posts: 1294
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

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

Offline
Posts: 6
Joined: Wed Sep 30, 2015 3:48 pm

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

Offline
Posts: 1162
Joined: Sun Oct 20, 2013 11:44 am

Post by Skif_off »

Nova
Show file C:\Users\%USERNAME%\.gitconfig please.

Offline
Posts: 1162
Joined: Sun Oct 20, 2013 11:44 am

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

Offline
Posts: 6
Joined: Wed Sep 30, 2015 3:48 pm

Post by Nova »

Hello, my .gitconfig contains:

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

Offline
Posts: 1162
Joined: Sun Oct 20, 2013 11:44 am

Post 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

Offline
Posts: 6
Joined: Wed Sep 30, 2015 3:48 pm

Post by Nova »

WOW!!

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

Thanks again.

Offline
Site Admin
Posts: 6417
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

Why not just add "/x" to "CmdLineBegin" manual parameter?

Offline
Posts: 1162
Joined: Sun Oct 20, 2013 11:44 am

Post 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.
Post Reply