git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Problem with merge when renaming

From
DEDavid Euresti <davi@euresti.com>
Date
Sep 18, 2007, 22:42 UTC
Message-ID
<95b3d0af0709181542s43cd55c1xb0e653be4c030dab@mail.gmail.com>
In-Reply-To
<7v7imnvca0.fsf@gitster.siamese.dyndns.org>
1) git version 1.5.2.5 and 1.5.3.1.139.g9346b

2) $ git-merge -s resolve branch-a $ git-merge -s resolve branch-b Trying really trivial in-index merge... fatal: Merge requires file-level merging Nope. Trying simple merge. Simple merge failed, trying Automatic merge. fatal: merge program failed Automatic merge failed; fix conflicts and then commit the result.

$ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: bar.txt # new file: foo.txt # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # # unmerged: dir/foo # unmerged: dir/foo/foo.bin # modified: dir/foo/foo.bin #

But if I do it in the other order I get this:
$ git-merge -s resolve branch-b
$ git-merge -s resolve branch-a
Trying really trivial in-index merge...
fatal: Merge requires file-level merging
Nope.
Trying simple merge.
Simple merge failed, trying Automatic merge.
Removing dir/foo
Adding dir/foo/foo.bin
ERROR: untracked dir/foo/foo.bin is overwritten by the merge.
fatal: merge program failed
Automatic merge failed; fix conflicts and then commit the result.

deuresti@deuresti-lnx /tmp/scm-rename-test/git-repo $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # deleted: dir/foo # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # # unmerged: dir/foo/foo.bin #

Thanks, David On 9/18/07, Junio C Hamano <gitster@pobox.com> wrote:

Show 12 quoted lines
> "David Euresti" <evelio@gmail.com> writes:
>
> > I think I found a problem when you move a file into a directory of the
> > same name.  Here's what I did.
>
> Two questions.
>
>  (1) git --version?
>
>  (2) if you do "git merge -s resolve" instead of just "git
>      merge", do you see a difference?
>
Previous: Junio C HamanoNext: Alex Riesen
Message 4 of 7 in “Problem with merge when renaming”
  1. David EurestiSep 18, 2007
  2. Extend t6020 with another test for d/f interactionsAlex Riesen, Sep 18, 2007
  3. Junio C HamanoSep 18, 2007
  4. David EurestiSep 18, 2007
  5. Alex RiesenSep 18, 2007
  6. Junio C HamanoSep 18, 2007
  7. Alex RiesenSep 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.