[TYPO3-dev] Troubles with submodules in Git

Dmitry Dulepov dmitry.dulepov at gmail.com
Thu Oct 6 08:19:28 CEST 2011


Hi!

Peter Niederlag wrote:
> hmm... I get a slightly different message (git version 1.7.2.5) but I

Applico:~$ git --version
git version 1.7.6.4

Latest from macports.

> think it is the same issue:
>
> ----------------
> warning: too many files (created: 687 deleted: 913), skipping inexact
> rename detection
> Automatic cherry-pick failed.  After resolving the conflicts,
> mark the corrected paths with 'git add<paths>' or 'git rm<paths>'
> and commit the result with:
>
>          git commit -c accf4bb5252309fda20870224f6a592ac12489f6
>
> ---------------
>> Applico:~/Projects/TYPO3/TYPO3-master$ git st
>> # On branch issue_22881
>> # Changes to be committed:
>> #
>> #    modified:
>> typo3/sysext/saltedpasswords/sv1/class.tx_saltedpasswords_sv1.php
>> #
>> # Unmerged paths:
>> #   (use "git add/rm<file>..." as appropriate to mark resolution)
>> #
>> #    added by us:        typo3/sysext/dbal
>> #    added by us:        typo3/sysext/extbase
>> #    added by us:        typo3/sysext/fluid
>> #    added by us:        typo3/sysext/version
>> #    added by us:        typo3/sysext/workspaces
>
> It is bascically very simple. ;)
>
> The patch is pretty old, dating back to 2011-04. At that time theses
> paths ^^^^ were not managed by submodules. For that reason the patch now
> will ~replace(overload) the submodules by replacing them with the old
> files content.
>
> Git tells you what you should do:
> <cite>git add/rm<file>..</cite>
> since we don't want those changes we will use git rm:
>
> git rm typo3/sysext/dbal

Applico:~/Projects/TYPO3/TYPO3-master$ git st
# On branch issue_22881
# Changes to be committed:
#
#	modified:   typo3/sysext/saltedpasswords/sv1/class.tx_saltedpasswords_sv1.php
#
# Unmerged paths:
#   (use "git add/rm <file>..." as appropriate to mark resolution)
#
#	added by us:        typo3/sysext/dbal
#	added by us:        typo3/sysext/extbase
#	added by us:        typo3/sysext/fluid
#	added by us:        typo3/sysext/version
#	added by us:        typo3/sysext/workspaces
#

Applico:~/Projects/TYPO3/TYPO3-master$ git rm typo3/sysext/dbal
typo3/sysext/dbal: needs merge
typo3/sysext/extbase: needs merge
typo3/sysext/fluid: needs merge
typo3/sysext/version: needs merge
typo3/sysext/workspaces: needs merge
rm 'typo3/sysext/dbal'
fatal: git rm: 'typo3/sysext/dbal': Operation not permitted

May be newer version of git does not work the same way?

> Actually I admit it is quite tricky and not always obvious. ;(

Exactly... I still think: do we need submodules or not? Seems like it 
causing troubles all the time for many people. Wouldn't it be possible to 
simply make branches for subprojects and merge them from time to time? 
Wouldn;t this be easier? Let's say:

git co -b dbal_working origin/master
...
git pull
git co master
git pull
git merge dbal_working

No?

-- 
Dmitry "itoldyou" Dulepov
TYPO3 core&security team member
E-mail: dmitry.dulepov at typo3.org
Web: http://dmitry-dulepov.com/





More information about the TYPO3-dev mailing list