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

Merge deletes File after case-only filename change #76

Open
nitspat-oegk opened this issue Jan 24, 2025 · 1 comment
Open

Merge deletes File after case-only filename change #76

nitspat-oegk opened this issue Jan 24, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@nitspat-oegk
Copy link

Version

6.1.0, 6.9.0

Operating System

Windows

Eclipse version

2022-03, 2024-03

Bug description

precondition: A file (MyDummyClass) is present in both a master and a feature branch. The camel-casing of the file is changed in the master branch (e.g. MyDummyClass -> MydummyClass).

The master branch is merged into the feature branch. This results in the correct name-change of the file (staged Changes).

Image

However, in addition the file is also being deleted (unstaged changes).

Image

Image

Actual behavior

A camel-case only change of a filename leads to a deletion of the file after a merge.

Expected behavior

After a merge, changes to the filename in the master branch should be present in the feature branch. The delete-command should not remain in the unstaged changes.

Relevant log output

Other information

Issue could be reproduced on private GitLab instance

@nitspat-oegk nitspat-oegk added the bug Something isn't working label Jan 24, 2025
@tomaswolf
Copy link
Contributor

I've pushed two changes to Gerrit:

@tomaswolf tomaswolf self-assigned this Feb 8, 2025
eclipse-egit-bot pushed a commit that referenced this issue Feb 9, 2025
On a case-insensitive filesystem, when one renames a file to a case
variant (such as "a.txt" to "A.txt"), the unstaged viewer should
show two entries: one for deleting "a.txt" and one for adding "A.txt".

It showed only one.

When populating the viewer content, we must not use case-insensitive
comparisons. Case-insensitive comparisons are fine later for determining
the display order, but if we use case-insensitive comparisons when
creating the entries, the view will have only one entry.

This fixes the display part of [1]. The more severe problem (file
"A.txt" is deleted altogether) will be fixed in JGit.

[1] #76

Bug: egit-76
Change-Id: Ibf1a3bc5096111298c2bfa0d0a259e38793f7281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants