-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diff_working_copies: Simplify tree checkout functions and update Diff…
…Side enum. I got annoyed by the checkout function above in my previous commit and tried to compress the code a bit, and I think the result is much nicer. I'm not certain that a closure is the right solution here, but I think it becomes easier to reason about the two temp filenames that get generated. I initially changed Option<DiffSide> to a bool, but found an enum more meaningful and more likely to be flexible in the future. I also moved the instruction writing to its own function. This makes the main `DiffEditWorkingCopies::check_out()` function is much nicer. J: This commit contains the following changes:
- Loading branch information
Showing
2 changed files
with
99 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters