1STG-EDIT(1) StGit Manual STG-EDIT(1)
2
3
4
6 stg-edit - Edit a patch description or diff
7
9 stg edit [options] [--] [<patch>]
10
12 Edit the description and author information of the given patch (or the
13 current patch if no patch name was given). With --diff, also edit the
14 diff.
15
16 The editor is invoked with the following contents:
17
18 From: A U Thor <author@example.com>
19 Date: creation date
20
21 Patch description
22
23 If --diff was specified, the diff appears at the bottom, after a
24 separator:
25
26 ---
27
28 Diff text
29
30 Command-line options can be used to modify specific information without
31 invoking the editor. (With the --edit option, the editor is invoked
32 even if such command-line options are given.)
33
34 If the patch diff is edited but does not apply, no changes are made to
35 the patch at all. The edited patch is saved to a file which you can
36 feed to "stg edit --file", once you have made sure it does apply.
37
38 With --set-tree you set the git tree of the patch to the specified
39 TREE-ISH without changing the tree of any other patches. When used on
40 the top patch, the index and work tree will be updated to match the
41 tree. This low-level option is primarily meant to be used by tools
42 built on top of StGit, such as the Emacs mode. See also the --set-tree
43 flag of stg push.
44
46 -d, --diff
47 Edit the patch diff.
48
49 -e, --edit
50 Invoke interactive editor.
51
52 --sign
53 Add a "Signed-off-by:" to the end of the patch.
54
55 --ack
56 Add an "Acked-by:" line to the end of the patch.
57
58 --review
59 Add a "Reviewed-by:" line to the end of the patch.
60
61 -m MESSAGE, --message MESSAGE
62 Use MESSAGE instead of invoking the editor.
63
64 -f FILE, --file FILE
65 Use the contents of FILE instead of invoking the editor. (If FILE
66 is "-", write to stdout.)
67
68 --save-template FILE
69 Instead of running the command, just write the message template to
70 FILE, and exit. (If FILE is "-", write to stdout.)
71
72 When driving StGit from another program, it is often useful to
73 first call a command with --save-template, then let the user edit
74 the message, and then call the same command with --file.
75
76 --no-verify
77 This option bypasses the commit-msg hook.
78
79 --author "NAME <EMAIL>"
80 Set the author details.
81
82 --authname NAME
83 Set the author name.
84
85 --authemail EMAIL
86 Set the author email.
87
88 --authdate DATE
89 Set the author date.
90
91 -O OPTIONS, --diff-opts OPTIONS
92 Extra options to pass to "git diff".
93
94 -t TREE-ISH, --set-tree TREE-ISH
95 Set the git tree of the patch to TREE-ISH.
96
98 Part of the StGit suite - see stg(1)
99
100
101
102StGit 0.23 01/27/2021 STG-EDIT(1)