this post was submitted on 02 Jul 2024
55 points (95.1% liked)

Git

2875 readers
1 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 1 year ago
MODERATORS
55
submitted 4 months ago* (last edited 4 months ago) by canpolat@programming.dev to c/git@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[–] lysdexic@programming.dev 1 points 4 months ago (1 children)

I don’t see why using submodules as a package manager should excuse their endless bugs.

I don't know what are these "endless bugs" you're talking about. Submodules might have a UX that's rough on the edges, but there are really no moving parts in them as they basically amount to cloning a repo and checking out a specific commit.

Do you actually have any specific, tangible issue with submodules? Even in the cases you're clearly and grossly misusing them

[–] FizzyOrange@programming.dev 1 points 4 months ago

Do you actually have any specific, tangible issue with submodules?

Yeah sure. These are few that I can remember off the top of my head. There have been more:

  • Submodules don't work reliably with worktrees. I can't remember what kind of bugs you run into but you will run into bugs if you mix them up. The official docs even warn you not to.

  • When you switch branches or pull you pretty much always have to git submodule update --init --recursive. Wouldn't it be great if git could do that for you? Turns out it can, via an option called submodule.recurse. However... if you use this you will run into a very bad bug that will seriously break your .git directory.

  • If you convert a submodule to a directory or vice versa and then switch between them git will get very confused and you'll have to do some rm -rfing.

Even in the cases you’re clearly and grossly misusing them

Oh right, so the bugs in Git are my fault. Ok whatever idiot.