Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 502 #503

Merged
merged 2 commits into from
Jan 24, 2016
Merged

Fix 502 #503

merged 2 commits into from
Jan 24, 2016

Conversation

spacewander
Copy link
Collaborator

Wrap GIT_EDITOR and replace pgrep
Hope it can fix #502

@jankatins
Copy link
Contributor

This still doesn't work:

λ git changelog
/tmp/git-changelog.yod History.md
C:\Program Files\Git\mingw64\bin\git-changelog: line 492: "C:\Program Files (x86)\Notepad++\notepad++.exe"  -multiInst -nosession -noPlugin: No such file or directory

caught signal, shutting down
ps: unknown option -- o
Try `ps --help' for more information.
λ ps --help
Usage: ps [-aefls] [-u UID] [-p PID]

Report process status

 -a, --all       show processes of all users
 -e, --everyone  show processes of all users
 -f, --full      show process uids, ppids
 -h, --help      output usage information and exit
 -l, --long      show process uids, ppids, pgids, winpids
 -p, --process   show information for specified PID
 -s, --summary   show process summary
 -u, --user      list processes owned by UID
 -V, --version   output version information and exit
 -W, --windows   show windows as well as cygwin processes

With no options, ps outputs the long format by default

This is the output of a ps -e directly before the failing line in _exit:

λ git changelog
C:\Program Files\Git\mingw64\bin\git-changelog: line 491: "C:\Program Files (x86)\Notepad++\notepad++.exe"  -multiInst -nosession -noPlugin: No such file or directory

caught signal, shutting down
      PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND
     9596       1    9596       8616  cons0     197611 09:18:33 /usr/bin/bash
     7160    9596    9596      11116  cons0     197611 09:18:33 /usr/bin/ps
     7612       1    7612       7612  ?         197611   Jan 13 /usr/bin/ssh-agent
ps: unknown option -- o
Try `ps --help' for more information.

Re the editor: the interesting thing is that it seems the quotes are there (original version without the quotes around GIT_EDITOR):

λ git changelog
C:\Program Files\Git\mingw64\bin\git-changelog: line 491: "C:\Program: No such file or directory
                                                          ^

@jankatins
Copy link
Contributor

Hah, this works: [[ -n "$GIT_EDITOR" ]] && eval $GIT_EDITOR "$changelog"

There is no pgrep in git for windows
@spacewander
Copy link
Collaborator Author

@JanSchulz
Thanks for your solution, I just submitted new change to my former pr. Now I am trying to solve the issue #504 together...

@jankatins
Copy link
Contributor

Just FYI: I tested this PR and it works on windows. So +1 for merging...

@hemanth
Copy link
Collaborator

hemanth commented Jan 24, 2016

Thank you @spacewander @JanSchulz .

hemanth added a commit that referenced this pull request Jan 24, 2016
@hemanth hemanth merged commit 5b45eb7 into tj:master Jan 24, 2016
@qw3rtman qw3rtman added this to the 4.1.0 milestone Jan 24, 2016
tardypad pushed a commit to tardypad/git-extras that referenced this pull request Jul 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

changelog does not work if GIT-EDITOR contains spaces
4 participants