Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 380
    • Issues 380
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3867
Closed
Open
Issue created Feb 07, 2022 by meigelb@meigelbContributor

GitLog does not show super project pointers in conflicted submodule

Merges of repositories which comprise submodules sometimes cause conflicts if the submodules cannot be updated fast-forward. In this case the correct revisions of the affected submodule need to be merged together which are given by the hashes the super repository is pointing to at the two commits involved in its merge. To facilitate such merges, TortoiseGit could visually highlight the relevant hashes of the submodule similar to the well-known purple super-project-pointer.

What steps will reproduce the problem?

  1. create repository with submodules and two feature branches with the following
Git commands
git init subrepo
cd subrepo
echo Test > readme.md
git add readme.md
git commit -m "initial commit"
cd ..

git init main
cd main
git submodule add ..\subrepo
git commit -m "add subrepo"

REM ====== add feat1
cd subrepo
echo feature 1 > file1.txt
git checkout -b feat1
git add file1.txt
git commit -m "add file1"
cd ..

git checkout -b feat1
git add -A
git commit -m "add feat1"

git checkout master
git submodule update

REM ====== add feat2
cd subrepo
echo feature 2 > file2.txt
git checkout -b feat2
git add file2.txt
git commit -m "add file2"
cd ..

git checkout -b feat2
git add -A
git commit -m "add feat2"
  1. continue the next steps with TortoiseGit
  2. ℹ show log of subrepo and it displays the purple "super-project-pointer" currently at branch feat2 super-project-pointer_in_submodule
  3. in main repo now merge branch feat1 into current branch feat2
  4. as a result of the merge, the executed git command will output
Failed to merge submodule subrepo
CONFLICT (submodule): Merge conflict in subrepo
Automatic merge failed; fix conflicts and then commit the result.
  1. click on button "Resolve"
  2. in dialog "Resolve" double click the subrepo which is colored in red since it has conflicts
  3. in dialog "Resolve Submodule Conflict"
    • resolve_submodule_conflict
    • ℹ under MERGE and MERGE_HEAD you see the revisions which should be merged together
    • click on any of the three buttons "Show log"
  4. in window "Log Message" enable checkbox "All Branches"
  5. Your task is to merge those two hashes together, which are given by the revisions in step 8 above. Do you remember them?
    • ❌ You will see the following window, where the relevant commits are not highlighted at all. Especially in large repositories with many commits and/or branches, the relevant commits are not as obvious as in this simple example. no_super-project-pointers_in_submodule_during_merge
    • ℹ The purple super-project-pointer is missing intentionally, since in conflict state, the main repo is not pointing to a single commit.

What is the expected output? What do you see instead?

  • expected: The window "Log Message" supports you with your merge, by highlighting the relevant revisions visually.
  • actual: The window "Log Message" does not highlight the relevant revisions. Instead you have to pick the correct commits manually by copying the hashes from the dialog in step 8 and finding them in the log view.

What version of TortoiseGit and Git are you using? On what operating system?

  • TortoiseGit 2.13.0.0
  • git version 2.35.1.windows.2
  • Windows 10 Build 19043.1466

Please provide any additional information below.

  • Btw., "super-repo-pointer" would be a more accurate name for the well-known purple label.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking