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: libgit2/libgit2
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: libgit2/libgit2
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ethomson/warnings-2
Choose a head ref
  • 9 commits
  • 12 files changed
  • 1 contributor

Commits on Mar 3, 2025

  1. notifications: a notification system for callers

    Users can now configure a "notification callback"; notifications are
    raised when a condition occurs in a git repository that an end-user
    should know about, or that the calling application may wish to act on.
    Notifications provide structured data, that is provided based on the
    type of notification (for example, file paths).
    
    In addition, an an informative message is provided when a notification
    is raised; the structured data should be sufficient for callers to build
    their own message, but the provided message should make that
    unnecessary.
    
    Some examples of likely future use of notifications:
    
    * `core.safecrlf=warn` messages are warning-level notifications. This
      allows the calling application to receive these notifications and
      display them to the user (for example, sending them to the console).
    
    * When a file cannot be written during checkout, we should inform the
      calling application. By default, git continues to check out when one
      (or more) paths fail to be written, but conclude that the checkout
      failed overall. Given this somewhat odd behavior, callers may wish to
      short-circuit this when any path fails to be written.
    
    * Callers may want structured failure information for a `safe.directory`
      failure so that they can get the file path without having to try to
      "screen scrape" the git_error message.
    ethomson committed Mar 3, 2025
    Configuration menu
    Copy the full SHA
    8cc0fc4 View commit details
    Browse the repository at this point in the history
  2. filter: produce warnings when core.safecrlf=warn

    Produce warning-level notifications when `core.safecrlf=warn`.
    ethomson committed Mar 3, 2025
    Configuration menu
    Copy the full SHA
    5ba12e3 View commit details
    Browse the repository at this point in the history
  3. filter: assert on invalid crlf state

    Produce an assertion when internally invalid CRLF configuration state
    exists.
    ethomson committed Mar 3, 2025
    Configuration menu
    Copy the full SHA
    808e6e8 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2025

  1. filter: use cl_invoke in tests for stack traceability

    The `cl_invoke` mechanism saves the current state so that helper methods
    (and callbacks) can use `cl_assert` logic, but attributing the failure
    to the correct lines (at the invoke-point).
    ethomson committed Mar 4, 2025
    Configuration menu
    Copy the full SHA
    849cf8e View commit details
    Browse the repository at this point in the history
  2. filter: raise fatal notifications for core.safecrlf failures

    Don't just raise CRLF notifications when `core.safecrlf=warn`, also
    raise notifications when `core.safecrlf=true`. The `core.safecrlf=true`
    notifications are _fatal_ errors, however. These exist so that users can
    get the filename that failed during a fatal error.
    ethomson committed Mar 4, 2025
    Configuration menu
    Copy the full SHA
    9cb599a View commit details
    Browse the repository at this point in the history
  3. cli: add a notification handler

    Provide a notification handler in the CLI so that (for example) warnings
    and non-fatal error information can be sent to stdout. The CLI ignores
    "fatal" level errors since they're superfluous; it will get the same
    error after the function returns.
    ethomson committed Mar 4, 2025
    Configuration menu
    Copy the full SHA
    8eb89ba View commit details
    Browse the repository at this point in the history
  4. cli fixup

    ethomson committed Mar 4, 2025
    Configuration menu
    Copy the full SHA
    4f24b27 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2025

  1. cli

    ethomson committed Mar 6, 2025
    Configuration menu
    Copy the full SHA
    298a484 View commit details
    Browse the repository at this point in the history
  2. crlf

    ethomson committed Mar 6, 2025
    Configuration menu
    Copy the full SHA
    4a51af0 View commit details
    Browse the repository at this point in the history
Loading