-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skip config reference check in sync #58
base: stable
Are you sure you want to change the base?
Conversation
Git and other clients such as SourceTree will rewrite .git/config in the modules when checking out a branch tracking a remote branch. The rewrite appears to be a remove then recreate operation, which efectively removes the .git/config symlink. As a consequence, repo sync will complain in project._CheckDirReference() will detect the src and dst for 'config' to be different and assume there are local changes which need not be overwritten/lost. As a workaround, from the sync context we skip the check on the config file to be correctly linked. This is probabaly NOT the Right Way(TM) to fix this, but is enough to allow the sync to work in a way which does not seem to be catastrophic or obviously broken. Probably the correct solution would be to remove the .repo config and replace and re-symlink it with the one in the module itself. Signed-off-by: Eddy Petrișor <[email protected]>
This is a fix/workaround for #57 |
Hi eddyp, i totally agree with you that this problem is important. You get rid of this with "rm -rf .git" and then repo sync . |
Finally the Git-2.12.0-64-bit does not break the various sym link when the symlink option is choosen at install time. |
Eddy Petrișor
Pe 16 mar. 2017 18:31, "PierreLeCorre" <[email protected]> a scris:
Finally the Git-2.12.0-64-bit does not break the various sym link when the
symlink option is choosen at install time.
Do you know if there is an after-install option that can be set, in case is
missed at install time. Do you know more info about it? Can the setting be
done at project level, or are they at host level.
As a consequence, this patch is not required.
In our team there is heavy use of SourceTree, will there be a need for
patch in all the git clients we use?
|
Hi, |
Git and other clients such as SourceTree will rewrite .git/config
in the modules when checking out a branch tracking a remote branch.
The rewrite appears to be a remove then recreate operation, which
efectively removes the .git/config symlink.
As a consequence, repo sync will complain in project._CheckDirReference()
will detect the src and dst for 'config' to be different and assume there
are local changes which need not be overwritten/lost.
As a workaround, from the sync context we skip the check on the config file
to be correctly linked.
This is probabaly NOT the Right Way(TM) to fix this, but is enough to
allow the sync to work in a way which does not seem to be catastrophic
or obviously broken.
Probably the correct solution would be to remove the .repo config and
replace and re-symlink it with the one in the module itself.