Git Product home page Git Product logo

Comments (3)

tarsius avatar tarsius commented on July 18, 2024 1

I looked into the code and found a lot of .git got treated as dir, and they usually appear after --separate-git-dir.

I guess the reason that drones got cloned with --separate-git-dir but not in the usual submodule style is to be able to checkout its branch.

The code in borg that involves --separate-git-dir converts repositories that were previously cloned using git clone, borg-clone, ... to move the git data to ~/.config/emacs/.git/modules/PKG/, where git submodule and bort-assimilate would have put them, had they been used to clone the repository.

I.e., the drones get cloned "as usual for git modules", if you use borg-assimilate (which implies --separate-git-dir), or the get converted after the fact (which involves using --separate-git-dir). The end result is the same.

Where this seems to go wrong is that the cleanup code assumes that ~/.config/emacs/.git itself is a directory.

I'll look into that at some point, but am rather busy right now.

You might want to consider using the same repository for your emacs configuration and your other dotfiles. I.e., don't make ~/.config/emacs itself a repository, add the ~/.config/emacs/lib/PKG repositories as modules of the ~/ repository. You will have to go through the "Bootstrapping from scratch" steps and make some adjustments to do this. Others have done that before I believe. You might be able to find something about it in older issues.

I deleted .git and symlinked ../.git/modules/emacs to .git and after that everything seems to work flawlessly, wondering why .git gets designed like this in git submodule.

I thought you did that intentionally:

I cloned the repo as a submodule of my dotfiles for independency.

from emacs.g.

A7R7 avatar A7R7 commented on July 18, 2024

I did not touch .git words but deleted the .git file and symlinked ../.git/modules/emacs to .git and after that everything seems to work flawlessly, wondering why .git gets designed like this in git submodule.

from emacs.g.

A7R7 avatar A7R7 commented on July 18, 2024

Thank you for your prompt reply!
Since symlinking ../.git/modules/emacs to .git actually works™,I may keep on doing this. It is just a little troublesome everytime I or someone deploy my dotfiles, but a makefile should automate all these procedures.

from emacs.g.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.