Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sergi/go-diff
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: gullitmiranda/go-diff
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 7 commits
  • 8 files changed
  • 2 contributors

Commits on Sep 9, 2024

  1. feat: Add the DiffUnified() method for formatting a unified diff.

    This adds a new `DiffUnified()` method which takes a `[]Diff` slice and formats
    it in the "unified diff" format. The `[]Diff` slice does not necessarily need
    to be a linewise diff.
    
    The implementation deals gracefully with missing newlines at the end of either
    side, as well as empty inputs on either side.
    
    The method accepts two optional arguments: `UnifiedLabels()` for setting the
    labels for the two inputs and `UnifiedContextLines()` for setting the number of
    context lines printed.
    
    Example usage:
    
    ```go
    unified := dmp.DiffUnified(diffs,
    	diffmatchpatch.UnifiedLabels("text1", "text2"),
    	diffmatchpatch.UnifiedContextLines(3))
    ```
    
    A convenience method, `Unified()`, takes two string inputs and returns the
    unified diff.
    
    Fixes: #124
    octo committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    137131e View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. refactor: Replace the hunk structure with Patch.

    Re-use the existing `Patch` struct to store "hunks" instead of adding a new
    struct for this purpose.
    octo committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    dd28458 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2025

  1. Configuration menu
    Copy the full SHA
    f3f35e9 View commit details
    Browse the repository at this point in the history
  2. feat(diff): implement dedicated line mode diffing functionality

    - Add DiffLineMode method for always-on line mode diffing
    - Introduce DiffFunction type for flexible diff computation
    - Add DiffCleanupLineBased for line-specific diff optimization
    - Refactor diffMainRunes to use closure-based approach
    - Update Go version to 1.24 and clean up dependencies
    - Add comprehensive test coverage for new functionality
    gullitmiranda committed Aug 21, 2025
    Configuration menu
    Copy the full SHA
    0569de3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e56cdad View commit details
    Browse the repository at this point in the history
  4. feat(deps): update Go version to 1.24 and add mise configuration

    - Update Go version from 1.13 to 1.24 in go.mod
    - Add mise.toml configuration for development tools setup
    - Include tasks for installing Go development tools (gopls, golangci-lint, delve)
    gullitmiranda committed Aug 21, 2025
    Configuration menu
    Copy the full SHA
    bd9c0a6 View commit details
    Browse the repository at this point in the history
  5. chore(deps): update Go dependencies to latest versions

    - Update testify from v1.4.0 to v1.10.0
    - Update yaml from v2.4.0 to v3.0.1
    - Add go-difflib v1.0.0 as indirect dependency
    - Clean up go.sum checksums
    gullitmiranda committed Aug 21, 2025
    Configuration menu
    Copy the full SHA
    c5a8242 View commit details
    Browse the repository at this point in the history
Loading