From: linux@horizon.com Date: Fri, 02 Dec 2005 09:19:46 GMT Subject: Re: More merge questions (why doesn't this work?) Message-ID: <20051202091946.1631.qmail@science.horizon.com> In-Reply-To: <7vek4xsx49.fsf@assigned-by-dhcp.cox.net> I was playing with the implications of the "deleted file in the index is not a conflict" merge rule, and came up with the following octopus test which fails to work. Note line 2 when choosing a directory to run it in! #!/bin/bash -xe rm -rf .git git-init-db echo "File A" > a echo "File B" > b echo "File C" > c git-add a b c git-commit -a -m "Octopus test repository" git-checkout -b a echo "Modifications to a" >> a git-commit -a -m "Modified file a" git-checkout -b b master echo "Modifications to b" >> b git-commit -a -m "Modified file b" git-checkout -b c master rm c git-commit -a -m "Deleted file c" git-checkout master #git merge --no-commit "" master c b a #git merge --no-commit "" master a b c git-rev-parse a b c > .git/FETCH_HEAD git-octopus (Commented out are the first few things I tried.) Can someone tell me why this doesn't work? It should be a simple in-index merge. Right after the incomplete merge (I hacked this into the git-octopus script), git-ls-files -s produces 100644 8fb437b77759c7709c122fbc8ba43f720e1fbc0a 0 a 100644 b3418f25da4393974aa205e2863f012e5b503369 0 b 100644 df78d3d51c369e1d2f1eadb73464aadd931d56b4 1 c 100644 df78d3d51c369e1d2f1eadb73464aadd931d56b4 2 c Which should be case 10 of the t/t1000-read-tree-m-3way.sh table and succeed. Other things I've discovered... 1) The MAJOR difference between "git checkout" and "git reset --hard" are that git-checkout takes a *head* as an argument and changes the .git/HEAD *symlink* to point to that head (ln -sf refs/heads/
.git/HEAD). "git reset" takes a *commit* (