Skip to content

git config status.renames=copies messes up staging #4890

@kapral18

Description

@kapral18

Describe the bug

UPDATE Opened a PR #4892

If you set

[status]
  renames=copies

The algo of rename detection is different than true. Now it detects based on threshold (50%) of content similarity.

This trips up lazygit status view and staging gets broken

To Reproduce

Steps to reproduce the behavior:

  1. git init
  2. git config status.renames copies
  3. echo foo > foo && git add . && git commit -m foo
  4. cp foo foo2
  5. mv foo foo1
  6. now lazygit and stage all files

Expected behavior

git status shows this scenario as

Image

So we should either support the copied status or explicitly state we don't support renames=copies|copy I guess.

Screenshots

Image

Version info:

  • Run lazygit --version and paste the result here
    commit=, build date=, build source=Homebrew, version=HEAD-0d5a410, os=darwin, arch=arm64, git version=2.51.0

  • Run git --version and paste the result here
    git version 2.51.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions