'\" t
.\" Title: stg-import
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 09/02/2017
.\" Manual: StGit Manual
.\" Source: StGit
.\" Language: English
.\"
.TH "STG\-IMPORT" "1" "09/02/2017" "StGit" "StGit Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
stg-import \- Import a GNU diff file as a new patch
.SH "SYNOPSIS"
.sp
.nf
\fIstg\fR import [options] [\-\-] [|]
.fi
.SH "DESCRIPTION"
Create a new patch and apply the given GNU diff file (or the standard input)\&. By default, the file name is used as the patch name but this can be overridden with the \fI\-\-name\fR option\&. The patch can either be a normal file with the description at the top or it can have standard mail format, the Subject, From and Date headers being used for generating the patch information\&. The command can also read series and mbox files\&.
If a patch does not apply cleanly, the failed diff is written to the \&.stgit\-failed\&.patch file and an empty StGIT patch is added to the stack\&.
The patch description has to be separated from the data with a \fI\-\-\-\fR line\&.
.SH "OPTIONS"
.PP
\-m, \-\-mail
.RS 4
Import the patch from a standard e\-mail file\&.
.RE
.PP
\-M, \-\-mbox
.RS 4
Import a series of patches from an mbox file\&.
.RE
.PP
\-s, \-\-series
.RS 4
Import a series of patches from a series file or a tar archive\&.
.RE
.PP
\-u, \-\-url
.RS 4
Import a patch from a URL\&.
.RE
.PP
\-n NAME, \-\-name NAME
.RS 4
Use NAME as the patch name\&.
.RE
.PP
\-p N, \-\-strip N
.RS 4
Remove N leading slashes from diff paths (default 1)\&.
.RE
.PP
\-t, \-\-stripname
.RS 4
Strip numbering and extension from patch name\&.
.RE
.PP
\-i, \-\-ignore
.RS 4
Ignore the applied patches in the series\&.
.RE
.PP
\-\-replace
.RS 4
Replace the unapplied patches in the series\&.
.RE
.PP
\-b BASE, \-\-base BASE
.RS 4
Use BASE instead of HEAD for file importing\&.
.RE
.PP
\-\-reject
.RS 4
Leave the rejected hunks in corresponding *\&.rej files\&.
.RE
.PP
\-e, \-\-edit
.RS 4
Invoke an editor for the patch description\&.
.RE
.PP
\-d, \-\-showdiff
.RS 4
Show the patch content in the editor buffer\&.
.RE
.PP
\-a "NAME ", \-\-author "NAME "
.RS 4
Use "NAME " as the author details\&.
.RE
.PP
\-\-authname AUTHNAME
.RS 4
Use AUTHNAME as the author name\&.
.RE
.PP
\-\-authemail AUTHEMAIL
.RS 4
Use AUTHEMAIL as the author e\-mail\&.
.RE
.PP
\-\-authdate AUTHDATE
.RS 4
Use AUTHDATE as the author date\&.
.RE
.PP
\-\-sign
.RS 4
Add a "Signed\-off\-by:" to the end of the patch\&.
.RE
.PP
\-\-ack
.RS 4
Add an "Acked\-by:" line to the end of the patch\&.
.RE
.PP
\-\-review
.RS 4
Add a "Reviewed\-by:" line to the end of the patch\&.
.RE
.SH "STGIT"
Part of the StGit suite \- see \fBstg\fR(1)