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

lolcommits dosen't skip capture when rebasing #417

Open
ka2n opened this issue Jun 28, 2022 · 2 comments
Open

lolcommits dosen't skip capture when rebasing #417

ka2n opened this issue Jun 28, 2022 · 2 comments

Comments

@ka2n
Copy link

ka2n commented Jun 28, 2022

Starting with Git 2.18, Git no longer sets $GIT_DIR when performing a post-commit hook.
So, lolcommit does not skip the capture when performing a git rebase.

workaround for Linux/macOS users:

Prepend this to lolcommits hook.

GIT_DIR=${GIT_DIR-`git rev-parse --git-dir`}

The whole post-commit script looks like this:

#!/bin/sh

### lolcommits hook (begin) ###
GIT_DIR=${GIT_DIR-`git rev-parse --git-dir`} && LANG="en_US.UTF-8" && PATH="$PATH:<ruby_path>:<imagemagic_path>" && if [ ! -d "$GIT_DIR/rebase-merge" ] && [ "$LOLCOMMITS_CAPTURE_DISABLED" != "true" ]; then lolcommits --fork --capture; fi
###  lolcommits hook (end)  ###

Thanks!

@matthutchinson
Copy link
Member

I've quickly patched a commit in to fix this, hopefully can release soon.

@ka2n
Copy link
Author

ka2n commented Jul 6, 2022

@matthutchinson Thank you! I hesitated because I don't have a windows machine.

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

2 participants