.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "LEI-P2Q 1" .TH LEI-P2Q 1 1993-10-02 public-inbox.git "public-inbox user manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME lei\-p2q \- use a patch to generate a lei\-q query .SH SYNOPSIS .IX Header "SYNOPSIS" lei p2q [OPTIONS] (FILE|COMMIT) .PP lei p2q [OPTIONS] (\-\-stdin|\-) .SH DESCRIPTION .IX Header "DESCRIPTION" Given a patch, create a query that can be fed on stdin to \fBlei\-q\fR\|(1). This is useful for mapping the patch to associated messages of an inbox. .PP The patch can be provided on stdin or as a file. Alternatively, when an argument is given that does not point to an existing file, it is taken as a reference to a commit in the current git repository, and \&\fBgit\-format\-patch\fR\|(1) is used to generate the patch. .SH OPTIONS .IX Header "OPTIONS" .IP "\-w PREFIX[,PREFIX]" 4 .IX Item "-w PREFIX[,PREFIX]" .PD 0 .IP \-\-want=PREFIX[,PREFIX] 4 .IX Item "--want=PREFIX[,PREFIX]" .PD Search prefixes to use. \f(CW\*(C`dfpost\*(C'\fR (post-image git blob ID) and \f(CW\*(C`dfn\*(C'\fR (file names from the diff) are the most useful. Other available values are \f(CW\*(C`dfa\*(C'\fR, \f(CW\*(C`dfb\*(C'\fR, \f(CW\*(C`dfctx\*(C'\fR, \f(CW\*(C`dfhh\*(C'\fR, and \f(CW\*(C`dfpre\*(C'\fR. .Sp Appending an integer to \f(CW\*(C`dfpost\*(C'\fR or \f(CW\*(C`dfpre\*(C'\fR indicates a minimum ID length, and the generated query will be for that value up through the default abbreviation length. For example, if the repository's \&\f(CW\*(C`core.abbrev\*(C'\fR is set to \f(CW\*(C`auto\*(C'\fR and git calculates the default abbreviation length as 7, \f(CW\*(C`dfpost6\*(C'\fR will expand a post-image blob ID of e7b4b32 (seven characters) into \f(CW\*(C`dfpost:e7b4b32 OR dfpost:e7b4b3\*(C'\fR. .Sp This option may be given multiple times. .Sp Default: \f(CW\*(C`dfpost7\*(C'\fR .IP \-\-stdin 4 .IX Item "--stdin" Read message from stdin. This is implicit if no arguments are given and stdin is a pipe or regular file. .IP \-\-debug 4 .IX Item "--debug" Dump output that shows the information collected for every prefix. This information can be useful for seeing how a patch is processed, but the format should not be considered stable. .IP \-\-uri 4 .IX Item "--uri" URI escape output for interacting with HTTP(S) public-inbox instances. .IP \-q 4 .IX Item "-q" .PD 0 .IP \-\-quiet 4 .IX Item "--quiet" .PD Suppress feedback messages. .SH EXAMPLES .IX Header "EXAMPLES" .Vb 2 \& # to search for all threads which touch a given thread: \& lei p2q $COMMIT_OID | lei q \-t \-o /tmp/results \& \& # to view results on a remote HTTP(S) public\-inbox instance \& $BROWSER https://example.com/pub\-inbox/?q=$(lei p2q \-\-uri $COMMIT_OID) \& \& # to view unapplied patches for a given $FILE from the past year: \& echo \e( rt:last.year.. AND dfn:$FILE \e) AND NOT \e( \e \& $(git log \-p \-\-pretty=mboxrd \-\-since=last.year $FILE | \& lei p2q \-F mboxrd ) \& \e) | lei q \-o /tmp/unapplied .Ve .SH CONTACT .IX Header "CONTACT" Feedback welcome via plain-text mail to .PP The mail archives are hosted at and .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright all contributors .PP License: AGPL\-3.0+ .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBlei\-q\fR\|(1)