Live data from Hacker News

Show HN: Vdm, a sane alternative to e.g. Git submodules

github.com

11–20 of 64 posts

Re: Show HN: Vdm, a sane alternative to e.g. Git submodules

#11
post #4

This seems to be almost the same as androids repo tool. https://android.googlesource.com/tools/repo Personally I don't see the difference between this and submodules. Repo stores the information in xml files, vdm stores it in yaml files and git submodules in the git database. I don't really care. The real headache for me is the trouble of traceability vs ease of use. You need to specify your dependencies with a sha1…

[deleted]

Re: Show HN: Vdm, a sane alternative to e.g. Git submodules

#13
post #10

Looks cool! Seems functionally similar to AOSP’s git-repo, but already feels more approachable with that simple yaml remote list. What collaborative tool would you recommend using with vdm? AOSP has gerrit which is sort of specifically designed for this multi-remote meta setup. GitHub/GitLab don’t play nice with this type of environment.

This tool looks like "submodules, but lighter", while repo is "submodules, but heavier". Looks to me like the motivation is for dependencies that are not hard enough to justify a submodule. Repo seriously sucks to use, but I also can't imagine many tools living up to AOSP-type workloads without being specifically designed for it. My gripe with repo is that it's really hard to pin the entire repo state if you have a b…

>This tool looks like "submodules, but lighter", while repo is "submodules, but heavier". Looks to me like the motivation is for dependencies that are not hard enough to justify a submodule.

I think you nailed how I was feeling in much fewer words!

Re: Show HN: Vdm, a sane alternative to e.g. Git submodules

#14
I think submodules make sense in a lot of use cases, but a gotcha I saw with a team introduced to them recently is that pulling down from a branch or switching branches doesn’t update the submodule and/or stop you from changing branches if it is modified without being committed in some way.

If I could have submodules that operated that way I think submodules would be a lot more straightforward to newcomers.

Re: Show HN: Vdm, a sane alternative to e.g. Git submodules

#15
In our case we do not use submodules, because we need to apply some patch or PR to the dependency.

To solve it we use git-aggregator (I am not the autor) (language agnostic too). It seem to have the same features as VDM + some extra one (possiblity to have a frozen file, possibly to apply patch/pr...)

Source : https://github.com/acsone/git-aggregator

Re: Show HN: Vdm, a sane alternative to e.g. Git submodules

#17
post #7

If it just clones the repos and removes the .git directories, then I assume it doesn't keep their commit history? So if you use e.g. `git blame` or `git log` to look at file history, you will see when changes were introduced to the parent repo, but not when/why those changes were made in the first place. In that respect, it resembles git-subtree with --squash, but differs from git-submodule or regular git-subtree.

Yep, you have it correct. I've got a note at the bottom of the README that I'm considering adding a config field to keep the .git directory, but I'm trying to keep pretty far away from git-in-git consequences/use cases. I said the same in another comment here, but I don't envision vdm becoming something that's git-specific or developmental -- it's really just intended to be a getter, not a writer, and the functionality reflects that.

Cool info though, thanks for sharing!

Re: Show HN: Vdm, a sane alternative to e.g. Git submodules

#18
post #16

For a Python project, what are the pros/cons of 1: A setup.py that installs dependencies like this: pip install git+https://github.com/dependency/repo 2: Git submodules ?

I like to wrap it in a venv (pure python project) or nix flake (mixed languages)

Re: Show HN: Vdm, a sane alternative to e.g. Git submodules

#19

I think submodules make sense in a lot of use cases, but a gotcha I saw with a team introduced to them recently is that pulling down from a branch or switching branches doesn’t update the submodule and/or stop you from changing branches if it is modified without being committed in some way. If I could have submodules that operated that way I think submodules would be a lot more straightforward to newcomers.

You might find this git option helpful: https://git-scm.com/docs/git-config#Documentation/git-config...

Re: Show HN: Vdm, a sane alternative to e.g. Git submodules

#20

I think submodules make sense in a lot of use cases, but a gotcha I saw with a team introduced to them recently is that pulling down from a branch or switching branches doesn’t update the submodule and/or stop you from changing branches if it is modified without being committed in some way. If I could have submodules that operated that way I think submodules would be a lot more straightforward to newcomers.

You might find this git option helpful: https://git-scm.com/docs/git-config#Documentation/git-config...

Note that this won't solve all cases. For example, you still have to watch out when merging branches with different submodule commit hashes that you run submodule update while merging.
Post reply on HN