-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Labels
applyingIssues related to applying patchesIssues related to applying patches
Description
The single Applier type does some messy internal state tracking to avoid mixing ApplyFile, ApplyTextFragment, and ApplyBinaryFragment. I think the following would be better:
- Create a
TextApplier(inapply_text.go) andBinaryApplier(inapply_binary.go). Each of these has methods to apply single fragments (and multiple fragments, in the case ofTextApplier.) - Remove the
Resetmethod and renameFlushtoCloseto better indicate that apply types are single-use - Remove the
Appliertype and theApplyFilemethod - Move the logic for
ApplyFileto the globalApplyfunction. This is the convenience function to select an applier based on the file type and execute it.
This should reduce confusion and provides an obvious place for the eventual text-only options for fuzzy apply.
Metadata
Metadata
Assignees
Labels
applyingIssues related to applying patchesIssues related to applying patches