Search code examples
gitgit-submodulessmartgit

How to disable this message `An error-prone admin area configuration` on Smartgit client?


The configuration is correct, I have a parent git repository on the folder D:\, with the submodule Packages/ANSIescape, while I also have a unrelated git repository on the folder D:\Packages.

1/73: The submodule at 'Packages/ANSIescape' has an error-prone admin area configuration.

For the submodule at Packages/ANSIescape the .git-admin directory is not located below D:\Packages\.git, but at D:\.git\modules\Packages\ANSIescape instead.

This indicates an error-prone configuration and will most likely result in confusion and strange behavior. You should re-done the submodule from scratch.

This message is slowing down a lot to open the submodule, it keeps count 1 per seconds until it gets on 73 submodules I had installed at the folder:

enter image description here

I am obeyed to click with my mouse 73 times on the close button, otherwise these messages never goes out. And they always come in, when I open the repository.


Update

There is this script which reproduces the same repository structure. You just need to run and open the repository on Smartgit, and it will point the error:

# Create the directory structure
mkdir main_repo
mkdir main_repo/unrelated_repo
mkdir main_repo/unrelated_repo/main_repo_submodule

cd main_repo

# Setup the unrelated_repo
cd unrelated_repo
printf "# UnRelated Repository\n\n" > README.md
git init
git add -f README.md
git commit -m "Added the unrelated repository first commit."
git remote add origin https://github.com/user/unrelated_repo

# Setup the main_repo_submodule
cd main_repo_submodule
printf "# This is a submodule from the \`main_repo\`, and not from the \`unrelated_repo\`\n" > README.md
git init
git add -f README.md
git commit -m "Added the main repository submodule first commit."
git remote add origin https://github.com/user/main_repo_submodule

# Setup the main_repo
cd ../..
printf "# Main Repo\n\nThis is the main repository which contains submodules\n" > README.md
printf "\nThis is a main_repo_file on the unrelated repository\n\n" > unrelated_repo/main_repo_file.txt
printf "\n*\n**\n\n" > unrelated_repo/.gitignore
git init
git add -f README.md unrelated_repo/main_repo_file.txt unrelated_repo/.gitignore
git submodule add -f -- https://github.com/user/main_repo_submodule "unrelated_repo/main_repo_submodule"

git commit -m "Added the first main repository first commit."
git remote add origin https://github.com/user/main_repo

# Move the submodule to the parent repository
mkdir -p .git/modules
mv unrelated_repo/main_repo_submodule/.git/ .git/modules/main_repo_submodule
printf "gitdir: ../../.git/modules/main_repo_submodule\n" > unrelated_repo/main_repo_submodule/.git

Solution

  • This do not answer the question, but this specific error was solved on the syntevo googles forum:

    How to remove this error The submodule at 'Packages every time I open my repository on Smartgit?

    Thanks, this was really helpful to reproduce the problem. As the bug was located in very central code, I've fixed this just in the latest 17.1 preview build (11074) which you can get from:

    1. http://www.syntevo.com/smartgit/preview

    On the first download you may not get the build 11074, but some older as 11073, then click on the menu Help -> Check for new version and it updates to build 11074 with the fix.