-
Notifications
You must be signed in to change notification settings - Fork 11
Diff Semantics #27
Comments
What we are missing currently is the possibility of conflicts. Those cannot arise when looking at only two states of a If we take history into account, we can run into conflicts. For example:
Say The question is, when would we need this? I'm not sure GH (f.ex.) shows you the conflicts with the merge target of a PR, it only tells you that there are conflicts afaik. Could be a very nice feature, though. |
So my thoughts on this that it might be derived by combining the browser.history("branch-d");
let d_directory = browser.get_directory();
browser.history("branch-e");
let e_directory = browser.get_directory();
let diff = diff(d_directory, e_directory); BUT writing out that example now makes me understand what you mean. Because if we say Thanks for that example! |
I suppose in this particular case we can try search the |
It’s probably worth noting that the types of the arguments are different: diff :: Directory -> Directory -> Diff is what we have now (cannot produce conflicts). However, there’s also: merge :: History a -> History a -> Either Conflicts Patch where a |
Mmm that's a good point. Something that's interesting though is that in our model you can only get a |
Leaving this here as a reminder: https://docs.rs/git2/0.10.1/git2/struct.Repository.html#method.diff_tree_to_tree |
Can we just start by wrapping this, under the |
Certainly doable, but I'd also like to have something in mind for when we would wanna be more generic backend-wise. I'll leave this as a discussion and create a new ticket to just go through |
Once this is done we can make moves on #22.
After seeing the amount of questions and discussion from #24 we can see that: One Does Not Simply Implement Diff 👌
We should discuss what we expect from our diff'ing semantics and what techniques might be used to achieve this. The result of this research should be a document that lays out our semantics and serve as reference for the implementation and documentation for the repo.
Some initial thoughts:
Directory
objects to start off withHistory
information?The text was updated successfully, but these errors were encountered: