git pull -s subtree doesn't work properly

1 message Options
Embed this post
Permalink
Oliver Kullmann

git pull -s subtree doesn't work properly

Reply Threaded More More options
Print post
Permalink
Hello,

using

IntroductionJava> git remote add -f CSM41 /home/kullmann/csoliver/UofT/Java0910/ProgrammingJava/CS-M41_Programs
IntroductionJava> git merge -s ours --no-commit CSM41/master
IntroductionJava> git read-tree --prefix=Artikel/Skripte/IntroductionJava/CS_M41/ -u CSM41/master
IntroductionJava> git commit -m "Einfuegen des CS-M41-Projektes als Verzeichnis CS_M41"

I have imported repository "CS-M41_Programs" into another repository. Later then
I replaced in the config-file the old url /home/kullmann/csoliver/UofT/Java0910/ProgrammingJava/CS-M41_Programs
by the new one

[remote "CSM41"]
        url = git://github.com/OKullmann/CS-M41-Programming-in-Java.git
        fetch = +refs/heads/*:refs/remotes/CSM41/*

But now

IntroductionJava> git pull -s subtree CSM41 master

doesn't work anymore: In the CSM41 repository just one file index.html was changed,
and apparently the merge strategy recognises that the other files haven't
been changed, while index.html is placed just as if the relative path would
start from the root of the repository.

IntroductionJava> git pull -s subtree CSM41 master
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
From git://github.com/OKullmann/CS-M41-Programming-in-Java
 * branch            master     -> FETCH_HEAD
CONFLICT (delete/modify): Artikel/LaTeX/SystemStile/Html/index.html deleted in HEAD a
nd modified in 38b11a96fa009a5b2c24cfc94c0268ab9ca7ce39. Version 38b11a96fa009a5b2c24
cfc94c0268ab9ca7ce39 of Artikel/LaTeX/SystemStile/Html/index.html left in tree.
Automatic merge failed; fix conflicts and then commit the result.

IntroductionJava> git status
# On branch master
# Unmerged paths:
#   (use "git reset HEAD <file>..." to unstage)
#   (use "git add <file>..." to mark resolution)
#
#       deleted by us:      ../../LaTeX/SystemStile/Html/index.html
#
no changes added to commit (use "git add" and/or "git commit -a")

The path of index.html is Artikel/Skripte/IntroductionJava/CS_M41/Html/index.html.
Why git thinks that index.html should be placed into another directory Artikel/LaTeX/SystemStile/Html/
I have no clue (this directory doesn't exist).

Is it possible to tell "git pull" where the subtree really is, or is that
not really the cause of the problem?

Thanks for your consideration!

Oliver

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html