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

Renames across module boundaries don't mark both modules as changed. #249

Open
alexrwegener opened this issue Mar 19, 2024 · 0 comments
Open

Comments

@alexrwegener
Copy link

Using --name-only for git diff only shows the path for the new location.

To test:

  • Commit a rename across a module boundary (old-module -> new-module for this example)
  • git --no-pager diff --name-only -M95 origin/main..HEAD

You'll see something like

new-module/src/main/kotlin/com/example/Renamed.kt

AMD does not mark both modules (old-module and new-module) as changed.

A fix could be switching from --name-only to --name-status. Using the same rename commit as before:

  • Run git --no-pager diff --name-status -M95 origin/main..HEAD

You'll see something like

R100	old-module/src/main/kotlin/com/example/Old.kt		new-module/src/main/kotlin/com/example/Renamed.kt
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