Skip to content
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

File/Directory change incorrectly reports conflict #1680

Open
derrickstolee opened this issue Jul 1, 2020 · 0 comments
Open

File/Directory change incorrectly reports conflict #1680

derrickstolee opened this issue Jul 1, 2020 · 0 comments

Comments

@derrickstolee
Copy link
Contributor

VFS for Git is somehow changing the behavior of git merge when handling a directory->file change.

Here is a repro scenario:

$ git clone https://dev.azure.com/gvfs/ci/_git/ForTests ForTests-Git

$ cd ForTests-Git

$ git merge --no-ff origin/FunctionalTests_20200701_MergeConflict_FolderToFile
Removing Scripts/StopDevService.bat
Removing Scripts/StartDevService.bat
Removing Scripts/SetupDevService.bat
Adding Scripts
Merge made by the 'recursive' strategy.
 Scripts                     | 1 +
 Scripts/SetupDevService.bat | 4 ----
 Scripts/StartDevService.bat | 4 ----
 Scripts/StopDevService.bat  | 4 ----
 4 files changed, 1 insertion(+), 12 deletions(-)
 create mode 100644 Scripts
 delete mode 100644 Scripts/SetupDevService.bat
 delete mode 100644 Scripts/StartDevService.bat
 delete mode 100644 Scripts/StopDevService.bat

However, VFS for Git reports this as a conflict instead:

$ gvfs clone https://dev.azure.com/gvfs/ci/_git/ForTests ForTests-VFS

$ cd ForTests-VFS/src

$ git merge --no-ff origin/FunctionalTests_20200701_MergeConflict_FolderToFile
CONFLICT (directory/file): There is a directory with name Scripts in HEAD. Adding Scripts as Scripts~origin_FunctionalTests_20200701_MergeConflict_FolderToFile
Automatic merge failed; fix conflicts and then commit the result.

$ git status
On branch test
You have unmerged paths.
  (fix conflicts and run "git commit")
  (use "git merge --abort" to abort the merge)

Changes to be committed:
        deleted:    Scripts/SetupDevService.bat
        deleted:    Scripts/StartDevService.bat
        deleted:    Scripts/StopDevService.bat

Unmerged paths:
  (use "git add <file>..." to mark resolution)
        added by them:   Scripts

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Scripts~origin_FunctionalTests_20200701_MergeConflict_FolderToFile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant