-
Notifications
You must be signed in to change notification settings - Fork 43
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
Problems with git submodules #8
Comments
Hey Javex! Does this problem occur, when not using submodules or only with submodules? |
Sorry for the late reply, it only happens inside a submodule. |
Sorry for letting this wait for much too long! Did I hear you right that you want a |
Yes. The particular problem (which git up perfectly describes & solves) is that I need to pull and merge each branch before pushing. Since I do that with submodules (i.e. |
It seems like the problem is that PyGitUp will always seek the toplevel repo (the output of |
I've updated PyGitUp so it should work. Could you try the latest dev version, if it actually works? |
As far as I understand you, you wanted to update all submodules inclusively, too. When I run I did not have any changes right now, so I could not test the actual functionality, i.e. whether it behaves correctly on all branches even if there are changes. But that's just basic git up stuff that I suppose is independent of it being a submodule. So in short: Thank you very much. That saves me a lot of trouble, awesome :) |
Yeah, I forgot to mention that PyGitUp now works with |
I've now released |
Is there some rationale behind this? To, by default, not update submodules if |
The rationale is that the original git-up doesn't update submodules when called from the root directory and I want to keep the behaviour of PyGitUp in line with it. Actually, the original breaks if called in a submodule (e.g. aanand/git-up#111) whereas PyGitUp handles it without errors :) |
Ok, fair enough, thanks. |
Short: When I run
git up
it does not run on my current working directories' git repository.Long: I have a master repository that has several submodules. To keep everything synced, I run
git pull && git submodule foreach pull
(and some more commands). This worked but always caused problems when pushing later. As I understand git up solves this. However, I noticed that git up seems to be running on the master each time in the submodule.For example, the master module has the branches
master
andreduced
while one submodule only hasmaster
and no reduced. However, this is the output produced when running above command (with only one submodule):Making things even more weird, when I go into the directory myself and do
git up
, the same thing happens:There isn't even a change in this directory, only in the master. I read up on PyGit docs so I ran this:
GIT_PYTHON_TRACE=y git up
:It still doesn't say that much about what's really going on though :(
But I executed some of the commands myself and it does behave differently, for example
git fetch --multiple --prune origin
did delete a branch on the first run but not on the second, indicating this command was never executed on this repository.Since I don't know so much about PyGitUp (or PyGit for that matter), I don't know how to debug this efficiently (I am capable of Python though, so I can assist there). I am not sure if I have a major configuration screwup or if this is a bug in PyGitUp but if someone could provide details on how to track this down, I would be very happy.
The text was updated successfully, but these errors were encountered: