diff: comparing patch series
diff subcommand allows comparing two different revisions of the
same patch series using
git range-diff. Note, that in order to
range-diff comparison, both revisions need to cleanly
apply to the current tree, which may not always be easy to achieve.
The easiest way to use it is to prepare two mbox files of the series you would like to compare first:
$ b4 am --no-cover -n ver1 msgid-of-ver-1 $ b4 am --no-cover -n ver2 msgid-of-ver-2 $ b4 diff -m ver1.mbx ver2.mbx
-g GITDIR, --gitdir GITDIR
Specify a path to the git tree to use, if not running the command inside a git tree.
By default, b4 will cache the retrieved threads for about 10 minutes. This lets you force b4 to ignore cache and retrieve the latest results.
-v WANTVERS [WANTVERS ...], --compare-versions WANTVERS [WANTVERS ...]
To properly work, this requires that both versions being compared are part of the same thread, which is rarely the case. In the future, this may work better as more series use the
change-idtrailer to keep track of revisions across discussion threads.
b4 diff <msgid> -v 2 3
b4 diffwill output the results of the range-diff command. However, this can be a wall of text, so instead you may want to just view the command that you can run yourself with the ranges prepared by b4. This additionally allows you to tweak the
git-rangeflags to use.
-m AMBOX AMBOX, --compare-am-mboxes AMBOX AMBOX
Compares two mbox files prepared by
git aminstead of querying the public-inbox server directly.
-o OUTDIFF, --output-diff OUTDIFF
range-diffoutput into a file. You should use
-ninstead and redirect output from the actual
(DEPRECATED) Show colour output even when outputting into a file. You should use
-ninstead and modify flags to