-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Comparing changes
Open a pull request
base repository: libgit2/libgit2
base: main
head repository: libgit2/libgit2
compare: ethomson/warnings-2
- 9 commits
- 12 files changed
- 1 contributor
Commits on Mar 3, 2025
-
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.
Configuration menu - View commit details
-
Copy full SHA for 8cc0fc4 - Browse repository at this point
Copy the full SHA 8cc0fc4View commit details -
filter: produce warnings when
core.safecrlf=warn
Produce warning-level notifications when `core.safecrlf=warn`.
Configuration menu - View commit details
-
Copy full SHA for 5ba12e3 - Browse repository at this point
Copy the full SHA 5ba12e3View commit details -
filter: assert on invalid crlf state
Produce an assertion when internally invalid CRLF configuration state exists.
Configuration menu - View commit details
-
Copy full SHA for 808e6e8 - Browse repository at this point
Copy the full SHA 808e6e8View commit details
Commits on Mar 4, 2025
-
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).
Configuration menu - View commit details
-
Copy full SHA for 849cf8e - Browse repository at this point
Copy the full SHA 849cf8eView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 9cb599a - Browse repository at this point
Copy the full SHA 9cb599aView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 8eb89ba - Browse repository at this point
Copy the full SHA 8eb89baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f24b27 - Browse repository at this point
Copy the full SHA 4f24b27View commit details
Commits on Mar 6, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 298a484 - Browse repository at this point
Copy the full SHA 298a484View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a51af0 - Browse repository at this point
Copy the full SHA 4a51af0View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...ethomson/warnings-2