Skip to content
Snippets Groups Projects

Ignore submodules that are defined in .gitmodules but are checked in as directories

Merged Stan Hu requested to merge stanhu/gitlab_git:fix-existing-submodule-dir into master

Check that a blob entry is a not a tree (aka directory). It's possible to check in a submodule in .gitmodules but not the actual directory, leading to a 500 Error in GitLab.

See: https://gitlab.com/stanhu/gitlab-git-test/commits/add-submodule-to-existing-dir and click Files to see the error.

NOTE: Don't merge this gitlab-git-test change into master; put it in another branch called fix-existing-submodule-dir. I could not get the gitlab_git tests to pass with master because the git checkout to the feature branch caused libgit2 to complained about a conflict, even though git checkout -b foo_branch origin/feature works fine. Apparently git uses no code in libgit2, which might explain the discrepancy. I suspect libgit2 sees the mismatched submodule directory as a conflict.

Closes: gitlab-org/gitlab-ce#1439 (duplicate here: https://github.com/gitlabhq/gitlabhq/issues/9140)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Stan Hu Added 1 commit:

    Added 1 commit:

    • c3c747a7 - Ignore submodules that are defined in .gitmodules but are checked in as directories.
  • Douwe Maan Status changed to merged

    Status changed to merged

  • Douwe Maan mentioned in commit 3d5a6b91

    mentioned in commit 3d5a6b91

  • Please register or sign in to reply
    Loading