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

borg-assimilate fails with "fatal: Not a git repository..." #3

Closed
NicolasPetton opened this issue Jun 20, 2017 · 8 comments
Closed
Assignees

Comments

@NicolasPetton
Copy link

My git repository must be in a bad state, but whenever I try to borg-assimilate a drone, I got an error message like:

fatal: Not a git repository: ../../.git/modules/company-lua

My emacs.d is at https://github.com/nicolaspetton/emacs.d

@tarsius
Copy link
Member

tarsius commented Jun 20, 2017

I have gotten errors like this before and it is one of the sharper edges of the modules functionality. Usually it was the result of me doing something very wrong, but git doesn't really help you figure out what that is because it bails out very early on. If I remember correctly it always gives an error like the above, but in some cases that isn't really an appropriate error.

Anyway, you have to get things into a "less corrupted state" before you can investigate what is actually wrong. Check if ~/.emacs.d/.git/modules/company-lua exists and if it is a valid gitdir. If not, then copy one of the neighboring gitdirs in its place. You might also have to adjust core.worktree. Also make sure lib/company-lua exists. If not, then create an empty directory.

@NicolasPetton
Copy link
Author

NicolasPetton commented Jun 20, 2017 via email

@NicolasPetton
Copy link
Author

@tarsius I got the same error again. It turns out the .git/modules/PACKAGE directory contains a .git file with the following:

gitdir: ../../.git/modules/PACKAGE

I have no clue why. After removing this file, it all works fine.

@tarsius
Copy link
Member

tarsius commented Jun 20, 2017

Do you use a very old git? I have some vague memory of a bug that caused the creation of such a file.

@NicolasPetton
Copy link
Author

git version 2.7.5

@tarsius
Copy link
Member

tarsius commented Jun 20, 2017

Turns out I was thinking of a different bogus file, see magit/magit@06a7f52.

@tarsius
Copy link
Member

tarsius commented Jun 20, 2017

Still it might be worth trying to reproduce this with a more recent version. (Newer versions have some nice new features also.)

@tarsius tarsius self-assigned this Jun 25, 2017
@tarsius
Copy link
Member

tarsius commented Aug 1, 2017

Please reopen if you run into this again.

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

No branches or pull requests

2 participants