From 59be08453137a3b9c6a25dc6787b5066a88a84cd Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Mon, 25 May 2020 15:22:30 -0400 Subject: Add -3 to "b4 am" to prep for a 3way merge The original code used for b4 diff was to prepare for a 3-way merge by making sure that all blob indexes exist in the local repo. Add this functionality to "b4 am" and document all the features added in the 0.5.0 branch. Signed-off-by: Konstantin Ryabitsev --- man/b4.5 | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- man/b4.5.rst | 45 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 103 insertions(+), 6 deletions(-) (limited to 'man') diff --git a/man/b4.5 b/man/b4.5 index 0e7df0e..9ea05d0 100644 --- a/man/b4.5 +++ b/man/b4.5 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH B4 5 "2020-04-10" "0.4.1" "" +.TH B4 5 "2020-05-25" "0.5.0" "" .SH NAME B4 \- Work with code submissions in a public-inbox archive . @@ -32,7 +32,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .. .SH SYNOPSIS .sp -b4 {mbox,am,attest,pr,ty} [options] +b4 {mbox,am,attest,pr,ty,diff} [options] .SH DESCRIPTION .sp This is a helper utility to work with patches and pull requests made @@ -54,6 +54,8 @@ precursor to Lore and Data in the Star Trek universe. \fIb4 pr\fP: (EXPERIMENTAL) Work with pull requests .IP \(bu 2 \fIb4 ty\fP: (EXPERIMENTAL) Create templated replies for processed patches and pull requests +.IP \(bu 2 +\fIb4 diff\fP: (EXPERIMENTAL) Show range\-diff style diffs between patch versions .UNINDENT .SH OPTIONS .INDENT 0.0 @@ -166,6 +168,13 @@ Save mbox patches in a quilt\-ready folder Cherry\-pick a subset of patches (e.g. "\-P 1\-2,4,6\-", "\-P _" to use just the msgid specified, or "\-P *globbing*" to match on commit subject) +.TP +.B \-g\fP,\fB \-\-guess\-base +Try to guess the base of the series (if not specified) +.TP +.B \-3\fP,\fB \-\-prep\-3way +Prepare for a 3\-way merge (tries to ensure that all +index blobs exist by making a fake commit range) .UNINDENT .UNINDENT .sp @@ -272,6 +281,57 @@ The \-\-since option to use when auto\-matching patches (default=1.week) .UNINDENT .sp \fIExample\fP: b4 ty \-\-auto +.SS b4 diff +.sp +usage: b4 diff [\-h] [\-g GITDIR] [\-p USEPROJECT] [\-C] [\-v WANTVERS [WANTVERS ...]] [\-n] [\-o OUTDIFF] [\-c] [\-m AMBOX AMBOX] [msgid] +.INDENT 0.0 +.TP +.B positional arguments: +msgid Message ID to process, pipe a raw message, or use \-m +.UNINDENT +.sp +optional arguments: +.INDENT 0.0 +.INDENT 3.5 +.INDENT 0.0 +.TP +.B \-h\fP,\fB \-\-help +show this help message and exit +.TP +.BI \-g \ GITDIR\fP,\fB \ \-\-gitdir \ GITDIR +Operate on this git tree instead of current dir +.TP +.BI \-p \ USEPROJECT\fP,\fB \ \-\-use\-project \ USEPROJECT +Use a specific project instead of guessing (linux\-mm, linux\-hardening, etc) +.TP +.B \-C\fP,\fB \-\-no\-cache +Do not use local cache +.UNINDENT +.INDENT 0.0 +.TP +.B \-v WANTVERS [WANTVERS ...], \-\-compare\-versions WANTVERS [WANTVERS ...] +Compare specific versions instead of latest and one before that, e.g. \-v 3 5 +.UNINDENT +.INDENT 0.0 +.TP +.B \-n\fP,\fB \-\-no\-diff +Do not generate a diff, just show the command to do it +.TP +.BI \-o \ OUTDIFF\fP,\fB \ \-\-output\-diff \ OUTDIFF +Save diff into this file instead of outputting to stdout +.TP +.B \-c\fP,\fB \-\-color +Force color output even when writing to file +.UNINDENT +.INDENT 0.0 +.TP +.B \-m AMBOX AMBOX, \-\-compare\-am\-mboxes AMBOX AMBOX +Compare two mbx files prepared with "b4 am" +.UNINDENT +.UNINDENT +.UNINDENT +.sp +\fIExample\fP: b4 diff .SH CONFIGURATION .sp B4 configuration is handled via git\-config(1), so you can store it in diff --git a/man/b4.5.rst b/man/b4.5.rst index c95b172..d8e28f6 100644 --- a/man/b4.5.rst +++ b/man/b4.5.rst @@ -5,15 +5,15 @@ Work with code submissions in a public-inbox archive ---------------------------------------------------- :Author: mricon@kernel.org -:Date: 2020-04-10 +:Date: 2020-05-25 :Copyright: The Linux Foundation and contributors :License: GPLv2+ -:Version: 0.4.1 +:Version: 0.5.0 :Manual section: 5 SYNOPSIS -------- -b4 {mbox,am,attest,pr,ty} [options] +b4 {mbox,am,attest,pr,ty,diff} [options] DESCRIPTION ----------- @@ -32,6 +32,7 @@ SUBCOMMANDS * *b4 attest*: (EXPERIMENTAL) Submit cryptographic attestation for patches * *b4 pr*: (EXPERIMENTAL) Work with pull requests * *b4 ty*: (EXPERIMENTAL) Create templated replies for processed patches and pull requests +* *b4 diff*: (EXPERIMENTAL) Show range-diff style diffs between patch versions OPTIONS ------- @@ -105,7 +106,11 @@ optional arguments: Cherry-pick a subset of patches (e.g. "-P 1-2,4,6-", "-P _" to use just the msgid specified, or "-P \*globbing\*" to match on commit subject) -  + -g, --guess-base + Try to guess the base of the series (if not specified) + -3, --prep-3way + Prepare for a 3-way merge (tries to ensure that all + index blobs exist by making a fake commit range) *Example*: b4 am 20200313231252.64999-1-keescook@chromium.org @@ -173,6 +178,38 @@ optional arguments: *Example*: b4 ty --auto +b4 diff +~~~~~~~ +usage: b4 diff [-h] [-g GITDIR] [-p USEPROJECT] [-C] [-v WANTVERS [WANTVERS ...]] [-n] [-o OUTDIFF] [-c] [-m AMBOX AMBOX] [msgid] + +positional arguments: + msgid Message ID to process, pipe a raw message, or use -m + +optional arguments: + + -h, --help show this help message and exit + -g GITDIR, --gitdir GITDIR + Operate on this git tree instead of current dir + -p USEPROJECT, --use-project USEPROJECT + Use a specific project instead of guessing (linux-mm, linux-hardening, etc) + -C, --no-cache Do not use local cache + + -v WANTVERS [WANTVERS ...], --compare-versions WANTVERS [WANTVERS ...] + Compare specific versions instead of latest and one before that, e.g. -v 3 5 + + -n, --no-diff + Do not generate a diff, just show the command to do it + + -o OUTDIFF, --output-diff OUTDIFF + Save diff into this file instead of outputting to stdout + -c, --color + Force color output even when writing to file + + -m AMBOX AMBOX, --compare-am-mboxes AMBOX AMBOX + Compare two mbx files prepared with "b4 am" + +*Example*: b4 diff + CONFIGURATION ------------- B4 configuration is handled via git-config(1), so you can store it in -- cgit v1.2.3