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

Should be possible to override LOLCOMMITS_DIR on a git repo basis #288

Open
Quazie opened this issue Oct 28, 2015 · 1 comment
Open

Should be possible to override LOLCOMMITS_DIR on a git repo basis #288

Quazie opened this issue Oct 28, 2015 · 1 comment
Labels

Comments

@Quazie
Copy link

Quazie commented Oct 28, 2015

I do both work and non-work things on my machine, for work I'll be adding the lolcommits images directly to my work dropbox folder and then creating a post commit hook to update the commit to have a link to the dropboxed image. But personal repos need not have this flow and can just go into ~./lolcommits

@matthutchinson
Copy link
Member

So this is actually possible right now, it's just not very obvious how to do it, since we do not have a command line option flag for the LOLCOMMITS_DIR setting.

After enabling lolcommits in both projects, do the following for the project you want to have lolcommits in Dropbox;

cd /your/git/repo

Edit the git commit hook that exists at .git/hooks/post-commit and change the line that starts with lolcommits --capture to:

LOLCOMMITS_DIR="/full/path/to/your/dropbox/directory" lolcommits --capture
# obviously change this path to your own dir

Thats it! All future captures will be saved to a directory at /full/path/to/your/dropbox/directory/repo-folder-name/ (this directory will be auto-created if it does not exist).

Bear in mind, when running the lolcommits commands directly in the console, you will NOT have this env var set, but you can precede any commands you run with LOLCOMMITS_DIR="/full/path/to/your/dropbox/directory" e.g.

LOLCOMMITS_DIR="/full/path/to/your/dropbox/directory" lolcommits --browse

I've tagged this issue as an 'enhancement' for now. In the future we could rebuild the options/config code to have a hierarchy of global and project specific options or allow a flag to be set for the LOLCOMMITS_DIR option. Until then you can try the approach above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants