Skip to content

Discarding the revision of a submodule destroys the whole submodule #3647

Closed

Description

@mhalttu

Description

When you have a repository in a GitHub that contains a submodule and you discard the revision change of the submodule, the whole submodule is deleted.

Version

GitHub Desktop version: 1.0.11

OS version: OS X 10.12.6

Steps to Reproduce

  1. Checkout a module that includes a submodule
  2. Go to the submodule and change the branch
  3. Observe the change in GitHub Desktop
  4. Discard the change

Expected behavior: The submodule reference points back to the original branch and includes the files in that branch

Actual behavior: The whole submodule is completely destroyed. The folder is empty.

Reproduces how often: 100%

Activity

  1. added
    investigation-needed
    on Dec 26, 2017
  2. added
    bug
    and removed
    investigation-needed
    on Jan 5, 2018
  3. shiftkey commented on Jan 5, 2018

    @shiftkey
    Member

    @mhalttu thanks for the report! This is reproducible on my end, and is probably because we don't special-case submodules when we're discarding changes...

  4. self-assigned this
    on Jan 5, 2018
  5. locked as resolved and limited conversation to collaborators on Jul 18, 2018
  6. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions