github / gitpad Goto Github PK
View Code? Open in Web Editor NEWNotepad.exe as Git commit editor
License: MIT License
Notepad.exe as Git commit editor
License: MIT License
When launching gitpad.exe from console prompt (in my case PowerShell.exe), and passing an argument, in attempt to discover any acceptable parameters, gitpad crashes with the following 'feedback':
PS .\> .\Gitpad.exe -?
System.ArgumentException: Illegal characters in path.
at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String
[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, AccessControlActions control, String[] pat
hList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, I
nt32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions opt
ions, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions opt
ions)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path, Encoding encoding)
at Gitpad.Program.Main(String[] args)
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: path
Could you please add a license file (preferably the MIT License) to this repo? I was thinking of using the IsProcessElevated()
method in my proprietary program. Thanks!
When attempting to perform a "git commit" operation, it fails with the following message:
---------------------------
App is Elevated
---------------------------
Run this application as a normal user (not as Elevated Administrator)
---------------------------
OK
---------------------------
I didn't launch the command session as an administrator (and it doesn't say "- Administrator" in the title), but it still says this, so that's got to be a bug. Not sure what else to try here.
Additionally: why should it matter? (normally, I would like to run my command sessions as an administrator.) -- I guess this is more of a feature request: please remove this requirement. (I'm pretty sure in the past I've used GitPad from an administrative command prompt.)
For instance, try running gitpad.exe --help. It crashes. We should handle this more gracefully.
Since Git for windows 2.5.3, it can work with notepad directly.
What about this project?
Github crashes immediately after starting, drops this message to console:
Unhandled Exception: System.Exception: GetTokenInformation failed at Gitpad.Program.IsProcessElevated() at Gitpad.Program.Main(String[] args)
When trying to use github for windows and gitpad is evoked this happens in the git bash:
$ git rebase -i HEAD~2 Unhandled Exception: System.Exception: GetTokenInformation failed at Gitpad.Program.IsProcessElevated() at Gitpad.Program.Main(String[] args) /libexec/git-core/git-rebase--interactive: line 212: 4620 Signal 67 gitpad "$@" Could not execute editor
Troubleshooting steps taken:
My own user account has full local administrator rights on computer.
I started a command prompt as domain administrator (runas /user:domain\admin cmd.exe), started the gitpad.exe I downloaded here manually and same message was dropped.
I am using the GitPad that comes bundled with GitHub for Windows. My initial text editor was set to the default Notepad, and commit messages opened for editing in that as expected. Then I changed my default program for .txt files to Sublime Text, and that caused commit messages to open in Sublime as expected. However, I quickly decided that I didn't like that behavior because of how the message would open in a tab but I'd have to close the entire editor to get the commit to proceed. So I changed the default program for .txt back to Notepad, but now GitPad seems "stuck" on using Sublime Text and I can't seem to convince it to unstick.
GitPad is the editor. At the Git Shell prompt, typing
$env:EDITOR
outputs
GitPad
I can prove that my default editor for text files is Notepad by opening Git Shell and typing
.\test.txt
This opens test.txt in Notepad. Then I try committing some changes with
git commit
and the commit message opens in Sublime Text.
Please help diagnosing.
This doesn't seem right. Check the code to see if we ever look at this registry value.
How to uninstall
Remove HKEY_CURRENT_USER\Environment\EDITOR from the registry and reboot your
system.
The download link from readme.md is broken.
When I run git commit, gitpad just crashes with the following:
`
C:\workspace [master +0 ~1 -0 | +25 ~0 -0 !]> git commit
Unhandled Exception: System.ComponentModel.Win32Exception: Application not found
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Gitpad.Program.Main(String[] args)
error: There was a problem with the editor 'gitpad'.
Please supply the message using either -m or -F option.`
When I do dir ~\appdata\roaming\gitpad
, it shows gitpad.exe
My EDITOR env var is set to ~\appdata\roaming\gitpad\gitpad.exe
This was raised in git-for-windows/git#278
Notepad++ is triggered 1st time and file opens and Im midway into editing file e.g which commits to squash/reword and before I get a chance to finish in cmd terminal it skips the operation to end. whatever the file I was editing is left as a uncommitted change and has to be discarded or deleted.
The recommended workaround was also identified:
Try setting your editor to "notepad++ -multiInst". Plain notepad++ will only tell the already running instance to open the file before exiting, which looks as if you finished editing the file in record time.
This is because Notepad++ can be used with a tabbed interface, and this can lead to a scenario where a file is opened in a new tab, and then the process closes immediately - getting into a state that's weird and confusing.
I had a quick look at what might be involved with passing arguments to the associated file editor, and I couldn't spot an easy solution. This also requires us to detect you've configured notepad++ as the default editor for text files, which we don't do right now - so that's more work.
I've got a lot on my plate right now, but happy to provide guidance where possible if someone is keen in getting involved.
I think you should give a hint how to reinstall GitPad.
My windows user name is "Mark Lambley". When using gitpad and doing a commit, I get an error due to the space in my name:
C:/Users/Mark Lambley/AppData/Roaming/GitPad/GitPad.exe: C:/Users/Mark: No such file or directory
error: There was a problem with the editor 'C:/Users/Mark Lambley/AppData/Roaming/GitPad/GitPad.exe'.
Please supply the message using either -m or -F option.
I have fixed this by replacing the registry entry with:
"EDITOR"="C:/Users/MARKLA~1/AppData/Roaming/GitPad/GitPad.exe"
I'm not sure whether wrapping quotes around the executable path is within the scope of this program or not, or whether or not you can store the registry path in "dir /X" format, or whether this is simply a matter of providing instructions on how to modify the registry in your readme for users who are getting this issue.
I installed GitPad by launching it, it reported no problems, then when opening a command prompt and typing git ec the message shown above appears.
It seems to barf on the fact that my user directory contains a space? I performed these steps on Windows 10 if that makes a difference. I can see that the program is converting the backslash to a forward slash; though I am not sure why I assume this is with good reason, but it still presents me with the error above.
Am I missing something obvious here? :\
I installed "GitHub for Windows" on my Windows XP VM, as well as on the some other Windows XP machines.
Each one has the same issue. GitPad crashes when invoked - e.g. git commit
C:\Documents and Settings\Adam\My Documents\GitHub\arms [master +1 ~0 -0 !]> git commit --amend
Unhandled Exception: System.Exception: GetTokenInformation failed
at Gitpad.Program.IsProcessElevated()
at Gitpad.Program.Main(String[] args)
error: There was a problem with the editor 'gitpad'.
Please supply the message using either -m or -F option.
The same thing happens if I download the latest GitPad.exe and try to install it.
What could be wrong?
GitPad uses ~/AppData in the path it sets, which doesn't work for any environment where $Home is remapped (such as my work). This causes gitpad to fail to launch correctly.
The GHfW installation package seems to not have this issue I guess, but GitPad is useful for people using other tools ๐
Please let me know if I've made any mistakes.
When I try to use "git commit" after installing, I get the following exception:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\cygdrive\c\Projects\[ProjectName]\.git\COMMIT_EDITMSG'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path, Encoding encoding)
at Gitpad.Program.Main(String[] args)
When I press CTRL+C (it just sits there locked), I get the following two lines of text:
error: There was a problem with the editor '~/AppData/Roaming/GitPad/GitPad.exe'.
Please supply the message using either -m or -F option.
Note, the repository I'm using (and current directory in the command prompt session) is "C:\Projects[ProjectName]" (no brackets on the actual project name).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.