On Wed, May 24, 2017, 22:11 Xen <l...@xenhideout.nl> wrote:

> Gergely Polonkai schreef op 24-05-2017 21:24:
>
> > I think you want to solve a problem with Git that should be solved by
> > some other process. As nothing prevents you from committing both local
> > file modifications *and* submodule updates (in fact, it can be useful
> > in a lot of cases), this becomes process related instead of tool
> > related.
> >
> > However, you want to use a screwdriver to handle nails. Have a review
> > process, where other developers reject your commit if it contains
> > anything but the submodule update. Have a CI machinery that enforces
> > this. Or anything along these lines. Git is a powerful tool, but it
> > won't solve all your problems.
>
> You are making a mistake. I don't have other developers.
>

Still, you seem to want solving a problem with Git that is not in Git's
domain.

It is possible that updating a submodule also requires updating files in
the main repository (e.g. due to changing interfaces), so Git should allow
changing both the submodule and the main repo's files.


> I asked about locking a local repository (copy), that's all.
>

I understand your question well. In a centralised version control system I
would agree you need to do such things. But Git is distributed, and this
also means in your local copy you can do whatever you want, as possible
upstream/peer repositories won't always see such changes.

So it comes down to the process you have, even if you develop alone
(actually you aren't; you work together with past and future you). Make
yourself not to commit submodule changes with code changes. If you can't,
enforce yourself with a CI, a Git hook, or something like that.


> Regards.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to