1STG-IMPORT(1) StGit Manual STG-IMPORT(1)
2
3
4
6 stg-import - Import a GNU diff file as a new patch
7
9 stg import [options] [--] [<file>|<url>]
10
12 Create a new patch and apply the given GNU diff file (or the standard
13 input). By default, the file name is used as the patch name but this
14 can be overridden with the --name option. The patch can either be a
15 normal file with the description at the top or it can have standard
16 mail format, the Subject, From and Date headers being used for
17 generating the patch information. The command can also read series and
18 mbox files.
19
20 If a patch does not apply cleanly, the failed diff is written to the
21 .stgit-failed.patch file and an empty StGit patch is added to the
22 stack.
23
24 The patch description has to be separated from the data with a ---
25 line.
26
28 -m, --mail
29 Import the patch from a standard e-mail file.
30
31 -M, --mbox
32 Import a series of patches from an mbox file.
33
34 -s, --series
35 Import a series of patches from a series file or a tar archive.
36
37 -u, --url
38 Import a patch from a URL.
39
40 -n NAME, --name NAME
41 Use NAME as the patch name.
42
43 -p N, --strip N
44 Remove N leading slashes from diff paths (default 1).
45
46 -t, --stripname
47 Strip numbering and extension from patch name.
48
49 -C N
50 Ensure N lines of surrounding context for each change.
51
52 -i, --ignore
53 Ignore the applied patches in the series.
54
55 --replace
56 Replace the unapplied patches in the series.
57
58 -b BASE, --base BASE
59 Use BASE instead of HEAD for file importing.
60
61 --reject
62 Leave the rejected hunks in corresponding *.rej files.
63
64 --keep-cr
65 Do not remove "\r" from email lines ending with "\r\n".
66
67 --message-id
68 Create Message-Id trailer in patch description based on the
69 Message-ID email header. This option is applicable when importing
70 with --mail or --mbox. This behavior may also be enabled via the
71 stgit.import.message-id configuration option.
72
73 -e, --edit
74 Invoke an editor for the patch description.
75
76 -d, --showdiff
77 Show the patch content in the editor buffer.
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 --sign
92 Add a "Signed-off-by:" trailer to the end of the message using the
93 committer name and email for the trailer value.
94
95 --sign-by VALUE
96 Add a "Signed-off-by:" trailer with a custom VALUE to the end of
97 the message.
98
99 --ack
100 Add an "Acked-by:" trailer to the end of the message using the
101 commiter name and email for the trailer value.
102
103 --ack-by VALUE
104 Add an "Acked-by:" trailer with a custom VALUE to the end of the
105 message.
106
107 --review
108 Add a "Reviewed-by:" trailer to the end of the message using the
109 commiter name and email for the trailer value.
110
111 --review-by VALUE
112 Add a "Reviewed-by:" trailer with custom VALUE to the end of the
113 message.
114
116 Part of the StGit suite - see stg(1)
117
118
119
120StGit 1.5 01/21/2023 STG-IMPORT(1)