git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug Report: "git submodule deinit" fails right after a clone
@ 2016-08-30 11:45 Thomas Bétous
  2016-09-14 20:29 ` Heiko Voigt
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Bétous @ 2016-08-30 11:45 UTC (permalink / raw)
  To: git

Hello,

I found a curious bug in git version 2.9.0.windows.1 (run on Windows 7
via git bash).

If I clone a repository containing submodules and run a "git submodule
deinit" on any of the submodules of this repository without executing
another git command, this command fails.

For instance:

(let's say the repo MyProject contains 2 submodules: Submodule1 and Submodule2)

$ git clone ssh://****/MyProject
[ ... "git clone" output ... ]
$ cd MyProject
$ git submodule deinit Submodule1
fatal: Please stage your changes to .gitmodules or stash them to proceed
Submodule work tree 'Submodule1' contains local modifications; use
'-f' to discard them
$ git submodule deinit Submodule2
fatal: Please stage your changes to .gitmodules or stash them to proceed
Submodule work tree 'Submodule2' contains local modifications; use
'-f' to discard them

First the error message is strange.
Then what is even stranger is that the error disappears if a "git
status" is run before the submodule deinit...


$ git clone ssh://****/MyProject
[ ... "git clone" output ... ]
$ cd MyProject
$ git submodule deinit Submodule1
fatal: Please stage your changes to .gitmodules or stash them to proceed
Submodule work tree 'Submodule1' contains local modifications; use
'-f' to discard them
$ git status
[ ... "git status" output ...]
$ git submodule deinit Submodule1
Cleared directory 'Submodule1'

I have been able to reproduce this error at least 10 times and with
different repositories so I do not think it comes from the state of my
repositories.
Moreover, the use of "--recursive" argument to the "git clone" command
did not change anything.

Are you able to reproduce this problem?

Thank you in advance.

Best regards,

Thomas

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

end of thread, other threads:[~2016-10-06 16:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 11:45 Bug Report: "git submodule deinit" fails right after a clone Thomas Bétous
2016-09-14 20:29 ` Heiko Voigt
2016-10-04 15:46   ` Thomas Bétous
2016-10-05 13:36     ` Heiko Voigt
     [not found]       ` <CAPOqYV+SR8=E24HR18ygJ-J-rV7=FedU+gGpq9mp+a7Mfk2LiQ@mail.gmail.com>
2016-10-06  9:20         ` Heiko Voigt
2016-10-06 16:10           ` Thomas Bétous

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).