All of lore.kernel.org
 help / color / mirror / Atom feed
* gitconfig get out of sync with submodule entries on branch switch
@ 2017-01-30 16:21 Benjamin Schindler
  2017-01-30 17:51 ` Brandon Williams
  2017-02-06 10:35 ` Stefan Beller
  0 siblings, 2 replies; 7+ messages in thread
From: Benjamin Schindler @ 2017-01-30 16:21 UTC (permalink / raw)
  To: git

Hi

Consider the following usecase: I have the master branch where I have a 
submodule A. I create a branch where I rename the submodule to be in the 
directory B. After doing all of this, everything looks good.
Now, I switch back to master. The first oddity is, that it fails to 
remove the folder B because there are still files in there:

bschindler@metis ~/Projects/submodule_test (testbranch) $ git checkout 
master
warning: unable to rmdir other_submodule: Directory not empty
Switched to branch 'master'

Git submodule deinit on B fails because the submodule is not known to 
git anymore (after all, the folder B exists only in the other branch). I 
can easily just remove the folder B from disk and initialize the 
submodule A again, so all seems good.

However, what is not good is that the submodule b is still known in 
.git/config. This is in particular a problem for us, because I know a 
number of tools which use git config to retrieve the submodule list. Is 
it therefore a bug that upon branch switch, the submodule gets 
deregistered, but its entry in .git/config remains?

thanks a lot
Benjamin Schindler

P.s. I did not subscribe to the mailing list, please add me at least do 
CC. Thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-08 19:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 16:21 gitconfig get out of sync with submodule entries on branch switch Benjamin Schindler
2017-01-30 17:51 ` Brandon Williams
2017-01-31  7:46   ` Benjamin Schindler
2017-01-31 22:04     ` Stefan Beller
2017-02-06 10:35 ` Stefan Beller
2017-02-06 12:17   ` Benjamin Schindler
2017-02-08 19:07     ` Stefan Beller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.