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

Handle git external worktrees correctly #324

Open
Khoyo opened this issue Nov 9, 2016 · 2 comments
Open

Handle git external worktrees correctly #324

Khoyo opened this issue Nov 9, 2016 · 2 comments
Labels

Comments

@Khoyo
Copy link

Khoyo commented Nov 9, 2016

As of now, if you have a repository named foo, and you create an external worktree, lolcommits gets confused and think you aren't in a git repository when committing from the external worktree

[foo] $ git worktree add ../foo-hotfix
[foo] $ cd ../foo-hotfix
...
Do some work...
...
[foo-hotfix] $ git commit
Repository root not found
/home/khoyo/.gem/ruby/2.3.0/gems/lolcommits-0.8.1/lib/lolcommits/runner.rb:23:in `initialize': Unknown VCS (RuntimeError)
	from /home/khoyo/.gem/ruby/2.3.0/gems/lolcommits-0.8.1/bin/lolcommits:104:in `new'
	from /home/khoyo/.gem/ruby/2.3.0/gems/lolcommits-0.8.1/bin/lolcommits:104:in `block in do_capture'
	from /home/khoyo/.gem/ruby/2.3.0/gems/lolcommits-0.8.1/lib/lolcommits/cli/process_runner.rb:25:in `block in fork_me?'
	from /home/khoyo/.gem/ruby/2.3.0/gems/lolcommits-0.8.1/lib/lolcommits/cli/process_runner.rb:24:in `fork'
	from /home/khoyo/.gem/ruby/2.3.0/gems/lolcommits-0.8.1/lib/lolcommits/cli/process_runner.rb:24:in `fork_me?'
	from /home/khoyo/.gem/ruby/2.3.0/gems/lolcommits-0.8.1/bin/lolcommits:87:in `do_capture'
	from /home/khoyo/.gem/ruby/2.3.0/gems/lolcommits-0.8.1/bin/lolcommits:321:in `<top (required)>'
	from /home/khoyo/.gem/ruby/2.3.0/bin/lolcommits:23:in `load'
	from /home/khoyo/.gem/ruby/2.3.0/bin/lolcommits:23:in `<main>'

@drdanz
Copy link

drdanz commented Jun 13, 2018

I can confirm the problem is still present in v0.12.1, but the message is now "You don't appear to be in a directory of a supported vcs project."

@gnutix
Copy link

gnutix commented Jun 1, 2022

That's too bad. I would have enjoyed reinstalling lolcommits, but I mostly work in worktrees now. :(

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

4 participants