Skip to content

Commit

Permalink
remove a TODO that turned out to be unnecessary.
Browse files Browse the repository at this point in the history
After all, stopping the merge when there is any conflict is highly relevant.
  • Loading branch information
Byron committed Nov 3, 2024
1 parent 3fb989b commit 096ca2e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ What follows is a high-level list of features and those which are planned:
* [x] blob-diff
* [ ] merge
- [x] blobs
- [ ] trees
- [x] trees
- [ ] commits
* [ ] rebase
* [ ] commit
Expand Down
7 changes: 2 additions & 5 deletions gix-merge/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,8 @@ pub struct Options {
/// The context to use when invoking merge-drivers.
pub blob_merge_command_ctx: gix_command::Context,
/// If `Some(what-is-unresolved)`, the first unresolved conflict will cause the entire merge to stop.
/// This is useful to see if there is any conflict, without performing the whole operation.
// TODO: Maybe remove this if the cost of figuring out conflicts is so low - after all, the data structures
// and initial diff is the expensive thing right now, which are always done upfront.
// However, this could change once we know do everything during the traversal, which probably doesn't work
// without caching stuff and is too complicated to actually do.
/// This is useful to see if there is any conflict, without performing the whole operation, something
/// that can be very relevant during merges that would cause a lot of blob-diffs.
pub fail_on_conflict: Option<UnresolvedConflict>,
/// This value also affects the size of merge-conflict markers, to allow differentiating
/// merge conflicts on each level, for any value greater than 0, with values `N` causing `N*2`
Expand Down
5 changes: 5 additions & 0 deletions gix/src/repository/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ impl Repository {
/// `labels` are typically chosen to identify the refs or names for `our_tree` and `their_tree` and `ancestor_tree` respectively.
///
/// `options` should be initialized with [`tree_merge_options()`](Self::tree_merge_options()).
///
/// ### Performance
///
/// It's highly recommended to [set an object cache](crate::Repository::compute_object_cache_size_for_tree_diffs)
/// to avoid extracting the same object multiple times.
// TODO: Use `crate::merge::Options` here and add niceties such as setting the resolution strategy.
pub fn merge_trees(
&self,
Expand Down

0 comments on commit 096ca2e

Please sign in to comment.