sapling icon indicating copy to clipboard operation
sapling copied to clipboard

Error: is not inside a repository

Open john-aws opened this issue 3 years ago • 3 comments

I'm raising this issue largely to document a potential misunderstanding that users of sapling might run into.

If you use sapling against an existing git clone, specifically one that was cloned using a traditional git client, sapling will not work. For example sl status in the repo will fail with:

abort: '/Users/me/src/somerepo' is not inside a repository, but this command requires a repository!
(use 'cd' to go to a directory inside a repository and try again)

This appears to happen because the sapling tool has its own equivalent of the .git/ sub-folder, named .sl/ which in this case is absent.

If you use sapling to clone the original repo then it all works fine.

john-aws avatar Nov 16 '22 20:11 john-aws

I intend to close this issue shortly as "working as designed" but it would be interesting to understand if there is any intention for sapling to support legacy .git/ based repos. I presume not.

john-aws avatar Nov 16 '22 21:11 john-aws

It's working as designed but I think we could make is less confusing with custom error message inside git repos. Let's close it once we make that fix.

mitrandir77 avatar Nov 16 '22 21:11 mitrandir77

100% - needs a better error message. Likely the first thing most users will do is try it against an existing local fork.

Imaclean74 avatar Nov 17 '22 05:11 Imaclean74

I just had exactly this experience trying to test out sapling for the first time and it took what felt like a lot of work to figure out what the actual issue was but the drive to have fb-style tooling again pushed me to find an answer.

sgianelli avatar Dec 29 '22 18:12 sgianelli