stevenharman / git_tracker

Some simple tricks that make working with Pivotal Tracker even better... and easier... um, besier!
https://github.com/stevenharman/git_tracker
MIT License
170 stars 11 forks source link

Check for git-tracker in hook before calling it #21

Closed flats closed 7 years ago

flats commented 7 years ago

git_tracker makes some GUI git clients (e.g. GitHub Desktop) unable to commit. This allows those clients to commit once again by checking for the existence of git-tracker before calling it in the hook.

Also specifies an older version of json for Ruby < 2, which I needed to do in order to pass CI.

Please let me know if you need any additional tests written for this.

stevenharman commented 7 years ago

Thanks, @flats. I hope to have a little time this coming week to catch up on PRs and issues across my OSS projects. With luck, we can get this fixed and shipped!

stevenharman commented 7 years ago

@flats I'm not opposed to this, but I wonder if it's a PATH issue with the GUI client? Perhaps similar to https://github.com/stevenharman/git_tracker/issues/20?

stevenharman commented 7 years ago

Heads up, @flats, I updated the supported versions of Ruby, which impacted some of your changes. I've already cleaned up the merge conflicts, but you'll need to pull them down locally if you're going to make any further changes.

flats commented 7 years ago

@stevenharman, thanks! My apologies for the delay.

It could well be something like that - GitHub Desktop displays a load such file -- pre-commit error. It's a pretty bare-bones client, and there's no way that I can find to configure something like the PATH given the limited settings.

I occasionally use a GUI client, I've had to manually edit the git hook in all of my active local repos in order to avoid this issue. I spoke with a co-worker who mentioned having this same problem with a different git client, though I can't recall which one at the moment.

Anyway, obviously up to you, but I can say that it would at least be helpful to me. I don't think this needs any additional changes.

stevenharman commented 7 years ago

Merged. I also released git_tracker v2.0.0 to Rubygems: https://rubygems.org/gems/git_tracker. A new PR has also been opened to Homebrew, so the package should be updated 🔜. Thanks for the help, @flats!