-
Notifications
You must be signed in to change notification settings - Fork 374
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
copy-tracking: plumb copy tracking through diff detection #4118
Conversation
9b49da6
to
6734640
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't comment on copy-tracing API changes, so just about diff_util part.
I think it's good to use Commit
or [Commit]
in place of MergedTree
. I'm trying to implement commit description templates, and show_diff()
callers in description_util.rs will be switched to be using a Commit
object. It may be either a temporary Commit
physically written to the store, or in-memory Commit
with fake commit id and physically-stored tree and parents.
This is great! That will fit together much better. |
b7e16c4
to
3e59437
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one little comment for now. I'll have to review it in detail later
76bac8e
to
2f7fbd7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The things I mentioned in Discord.
7390d9a
to
f298f37
Compare
d988f3f
to
c855ac8
Compare
d31bfee
to
2baa663
Compare
a087d90
to
64aec51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, minus the few remaining nits.
But please give @yuja another chance to comment too.
@yuja: As I said elsewhere on this PR, I don't think the API changes in the first commit are quite right. However, I think the rest of the series looks correct, and it provides practical improvements for Git users. I therefore think it makes sense to get this in in its current form, even if we know we're going to have change the API later. I don't think this PR makes it significantly harder to make those changes later, whatever they are - the changes to the diff iterator/stream and the commands using them see like they probably won't change significantly. Let us know if you disagree, of course.
And thanks a lot for your hard work and patience with this PR, @fowles! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- use a single commit instead of an array of them. This simplifies the implementation. A higher level api can wrap this when an array of commits is desired and those semantics are figured out. - since this API is directly 1-1 on parents, there are no conflicts - if we introduce a higher level API that handles lists of commits, we may need to restore the conflict/resolved distinction, but for now simplify
- add the field and make it compile, but don't use it yet
- force each diff command to explicitly enable copy tracking - enable copy tracking in diff_summary - post-process for diff iterator - post-process for diff stream - update changelog
Re-approach copy tracking with a simpler signature. Push through end-to-end copy for
diff -s
.This is not ready to submit, but is complete enough that I would like feedback on the direction. Remaining things to do:
CHANGELOG.md