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

init-dev-env commit trigger guard does not fire when committing from gui #319

Closed
bitwiseman opened this issue Jan 22, 2013 · 8 comments
Closed

Comments

@bitwiseman
Copy link
Contributor

Repro:

  • grunt init-dev-env
  • Make a change to the readme.md
  • git commit -am "this commit should fail the guard"
  • Commit should not succeed.
  • git gui
  • Stage the file and use the commit message: "this commit should fail the guard"

Expected:
Commit does not succeed.

Actual:
Commit succeeds.

@vojtajina
Copy link
Contributor

What UI do you use ? I use gitx and it works. As long as the UI runs git commit without -n or --no-verify, it should call it.

On Tue, Jan 22, 2013 at 12:05 PM, Liam Newman notifications@github.comwrote:


Reply to this email directly or view it on GitHubhttps://github.com/testacular/testacular/issues/319.

@bitwiseman
Copy link
Contributor Author

See repro: git gui. Perhaps this commit message check should be part of the default grunt as well?

@vojtajina
Copy link
Contributor

Nope, it's not grunt task on purpose. This should be fast, you gonna wait
for that during every commit. Bootstrapping whole grunt is not necessary at
all.

Based on the git-gui, I guess you are on the awesome OS by Microsoft, right
? I would be very surprised if the git gui passed --no-verify when
committing.

I would suspect the symlink does not working on Windows. Can you try to add
type "junction" into the fs.symlink call (inside tasks/init-dev.env.js) ?
See
http://nodejs.org/api/fs.html#fs_fs_symlink_srcpath_dstpath_type_callback

V.

On Wed, Jan 23, 2013 at 1:31 PM, Liam Newman notifications@github.comwrote:

See repro: git gui. Perhaps this commit message check should be a grunt
step as well?


Reply to this email directly or view it on GitHubhttps://github.com/testacular/testacular/issues/319#issuecomment-12623588.

@bitwiseman
Copy link
Contributor Author

Nope, this particular repro was on osx.
I understand what you said about windows and symlinks, but that is probably a different issue.

@vojtajina
Copy link
Contributor

OSX ? I'm not sure what is the git gui you are using then.

tasks/lib/validate-commit-msg.js is the script. You need to have a symlink
from .git/hooks/commit-msg to it.

V.

On Fri, Jan 25, 2013 at 11:59 AM, Liam Newman notifications@github.comwrote:

Nope, this particular repro was on osx.
I don't know what you suggested here.


Reply to this email directly or view it on GitHubhttps://github.com/testacular/testacular/issues/319#issuecomment-12718061.

@bitwiseman
Copy link
Contributor Author

if you do a default install of git from git-scm.com you get the ability to call "git gui" from the command line. That's what I used to repro this. I'll research it when I get a chance. I'll also try it out on windows.

@animous
Copy link

animous commented Jan 31, 2013

Reproduced this on linux as well. Looks like the issue may be that we're looking for COMMIT_EDITMSG and git gui seems to use GITGUI_EDITMSG. Both git gui and command-line git seem to respect the commit-msg hook with the patch at animous@f2f703a (but I'm not proposing that as a fix; maybe we should instead be finding the .git dir via something like git rev-parse --show-cdup).

@vojtajina
Copy link
Contributor

Oh, thanks @animous ! Now I see, silly me ;-)

This should work better https://github.com/testacular/testacular/commit/9cdaf77344c288bba64dcc6369787dbbf0b9acdc, let me know if it works...

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

No branches or pull requests

3 participants