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: ruby-git/ruby-git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.2
Choose a base ref
...
head repository: ruby-git/ruby-git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.0.3
Choose a head ref
  • 8 commits
  • 18 files changed
  • 1 contributor

Commits on Jul 8, 2025

  1. fix: un-deprecate Git::Diff methods

    These methods were deprecated with the same thinking that
    the Git::Log methods were deprecated. However, where
    Git::Log is a query builder, Git::Diff is (mostly) not... it is a
    facade over diff, diff_stats, and diff_path_stats.
    
    A problem remains with the Git::Diff class in that if you call
    the #path method after retrieving results, the results are not
    updated which may cause unexpected results.
    
    I'll consider what changes should be made to the Git::Diff
    class at a later date.
    jcouball committed Jul 8, 2025
    Configuration menu
    Copy the full SHA
    761b6ff View commit details
    Browse the repository at this point in the history
  2. fix: report correct line number in deprecation warnings

    ActiveSupport::Deprecation is designed to report the line where the deprecated method
    is called (one level up the call stack), not where the warning itself is defined.
    
    The previous implementation triggered warnings from an internal helper method,
    causing them to report the location with the Git gem. This commit moves the `warn`
    call into the public-facing deprecated method, ensuring the warning correctly points
    to the user's code that should be changed.
    jcouball committed Jul 8, 2025
    Configuration menu
    Copy the full SHA
    cca0deb View commit details
    Browse the repository at this point in the history
  3. fix: correct the deprecation horizon for Git deprecations

    Correctly report that the current deprecations will be removed
    by version 5.0.0 of the git gem.
    jcouball committed Jul 8, 2025
    Configuration menu
    Copy the full SHA
    b7b7f38 View commit details
    Browse the repository at this point in the history
  4. fix: internally create a Stash with non-deprecated initializer args

    this is so that non-deprecated use of this gem will not produce
    deprecation warnings that the user can't fix.
    jcouball committed Jul 8, 2025
    Configuration menu
    Copy the full SHA
    8b9b9e2 View commit details
    Browse the repository at this point in the history
  5. test: update all tests to not use deprecated features

    Several methods, arguments, and behaviors were deprecated
    but the tests were not updated to use alternates. This caused a
    lot of deprecation warnings when running the tests.
    jcouball committed Jul 8, 2025
    Configuration menu
    Copy the full SHA
    33ab0e2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1de27da View commit details
    Browse the repository at this point in the history
  7. test: make tests that emit a deprecation warning fail

    Deprecation warnings should not be ignored.
    
    This is important so that:
    * when a user sees a deprecation warning, they can be confident it is coming from
      their code and not this gem
    * test output is clean and does not contain noisey deprecation warnings
    
    Tests whose purpose is to test that a deprecation warning is issued in the right
    circumstance should mock Git::Deprecation#warn to avoid raising an error.
    jcouball committed Jul 8, 2025
    Configuration menu
    Copy the full SHA
    7e211d7 View commit details
    Browse the repository at this point in the history
  8. chore: release v4.0.3

    jcouball committed Jul 8, 2025
    Configuration menu
    Copy the full SHA
    feab258 View commit details
    Browse the repository at this point in the history
Loading