-
Notifications
You must be signed in to change notification settings - Fork 330
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
Add rename detection #47
Comments
A few logistical questions:
I ran into an especially ugly rename+edit case recently and got intensely interested in improving this. =) I'd wanted to use |
This question is confusing because Git doesn't deal with files (it has blobs), but it does have a |
We don't know yet if we're going to do rename tracking or rename detection. I'm leaning towards tracking, mostly because it seems like it would scale better. One interesting case that rename detection handles well when commit A adds file foo, commit B modifies it, and then you amend A with a rename from foo to bar (https://bz.mercurial-scm.org/show_bug.cgi?id=5457). Also, if we want to track renames and also track content moves at the sub-file level (like We should also keep in mind that diffing will hopefully get smarter in the future. In particular, I hope we'll start doing language-/AST-aware diffing and merging at some point. So we probably don't want to do any sub-file-level tracking of moved content, because we'll probably be able to detect exactly what moved in the future. Relevant message from Linus Torvalds: https://gist.github.com/borekb/3a548596ffd27ad6d948854751756a08 |
Right, I think that's exactly what David is saying - that Git doesn't track renames. Mercurial does track renames. |
The lack of any way to resolve conflicts where I've edited a file and I merge or rebase something which has renamed that file is a bit of a bummer at the moment; I'd appreciate even a manual way to fix this, e.g. if I could edit the conflicted revision and somehow tell jj that the file isn't deleted it just moved. Also, since the conflicts are a result of a rebase I can't do something like To compare the two, this would take me about 40mins using I don't get conflicts terribly often on my current project, but if I ended up with these even rarely it would be a dealbreaker for using jj for me. Cheers! |
We should use rename detection at least when diffing and merging.
The footnote on https://blog.palantir.com/optimizing-gits-merge-machinery-2-d81391b97878 has some information about how Git does it.
The text was updated successfully, but these errors were encountered: