-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
range-diff: support reading mbox files
Internally, the `git range-diff` command spawns a `git log` process and parses its output for the given commit ranges. This works well when the patches that need to be compared are present in the local repository in the form of commits. In scenarios where that is not the case, the `range-diff` command is currently less helpful. The Git mailing list is such a scenario: Instead of using Git to exchange commits, the patches are sent there as plain-text and no commit range can be specified to let `range-diff` consume those patches. Instead, the expectation is to download the mails, apply them locally and then use `range-diff`. This can be quite cumbersome e.g. when a suitable base revision has to be found first where the patch applies cleanly. Let's offer a way to read those patches from pre-prepared MBox files instead when an argument "mbox:<filename>" is passed instead of a commit range. For extra convenience, interpret the filename `-` as standard input. This makes it easy to compare contributions on the mailing list with the actual commits that were integrated into Git's main branch. Example: commit=5c4003ca3f0e9ac6d3c8aa3e387ff843bd440411 mid=bdfa3845b81531863941e6a97c28eb1afa62dd2c.1489435755.git.johannes.schindelin@gmx.de curl -s https://lore.kernel.org/git/$mid/raw | git range-diff mbox:- $commit^! This addresses gitgitgadget#207 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Taylor Blau <me@ttaylorr.com>
- Loading branch information
Showing
3 changed files
with
327 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters