1LEI-P2Q(1) public-inbox user manual LEI-P2Q(1)
2
3
4
6 lei-p2q - use a patch to generate a lei-q query
7
9 lei p2q [OPTIONS] (FILE|COMMIT)
10
11 lei p2q [OPTIONS] (--stdin|-)
12
14 Given a patch, create a query that can be fed on stdin to lei-q(1).
15 This is useful for mapping the patch to associated messages of an
16 inbox.
17
18 The patch can be provided on stdin or as a file. Alternatively, when
19 an argument is given that does not point to an existing file, it is
20 taken as a reference to a commit in the current git repository, and
21 git-format-patch(1) is used to generate the patch.
22
24 -w PREFIX[,PREFIX]
25 --want=PREFIX[,PREFIX]
26 Search prefixes to use. "dfpost" (post-image git blob ID) and
27 "dfn" (file names from the diff) are the most useful. Other
28 available values are "dfa", "dfb", "dfctx", "dfhh", and "dfpre".
29
30 Appending an integer to "dfpost" or "dfpre" indicates a minimum ID
31 length, and the generated query will be for that value up through
32 the default abbreviation length. For example, if the repository's
33 "core.abbrev" is set to "auto" and git calculates the default
34 abbreviation length as 7, "dfpost6" will expand a post-image blob
35 ID of e7b4b32 (seven characters) into "dfpost:e7b4b32 OR
36 dfpost:e7b4b3".
37
38 This option may be given multiple times.
39
40 Default: "dfpost7"
41
42 --stdin
43 Read message from stdin. This is implicit if no arguments are
44 given and stdin is a pipe or regular file.
45
46 --debug
47 Dump output that shows the information collected for every prefix.
48 This information can be useful for seeing how a patch is processed,
49 but the format should not be considered stable.
50
51 --uri
52 URI escape output for interacting with HTTP(S) public-inbox
53 instances.
54
55 -q
56 --quiet
57 Suppress feedback messages.
58
60 # to search for all threads which touch a given thread:
61 lei p2q $COMMIT_OID | lei q -t -o /tmp/results
62
63 # to view results on a remote HTTP(S) public-inbox instance
64 $BROWSER https://example.com/pub-inbox/?q=$(lei p2q --uri $COMMIT_OID)
65
66 # to view unapplied patches for a given $FILE from the past year:
67 echo \( rt:last.year.. AND dfn:$FILE \) AND NOT \( \
68 $(git log -p --pretty=mboxrd --since=last.year $FILE |
69 lei p2q -F mboxrd )
70 \) | lei q -o /tmp/unapplied
71
73 Feedback welcome via plain-text mail to <mailto:meta@public-inbox.org>
74
75 The mail archives are hosted at <https://public-inbox.org/meta/> and
76 <http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
77
79 Copyright all contributors <mailto:meta@public-inbox.org>
80
81 License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
82
84 lei-q(1)
85
86
87
88public-inbox.git 1993-10-02 LEI-P2Q(1)