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?
- 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"
- continue the next steps with TortoiseGit
-
ℹ show log of subrepo and it displays the purple "super-project-pointer" currently at branch feat2 - in main repo now merge branch feat1 into current branch feat2
- 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.
- click on button "Resolve"
- in dialog "Resolve" double click the subrepo which is colored in red since it has conflicts
- in dialog "Resolve Submodule Conflict"
- in window "Log Message" enable checkbox "All Branches"
- 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. -
ℹ 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.