SYNOPSIS
--------
[verse]
- 'git-format-patch' [<common diff options>] [-n | -k] [-o <dir> | --stdout]
- [--attach] [--thread] [-s | --signoff] [--start-number <n>]
+ 'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--thread]
+ [--attach[=<boundary>] | --inline[=<boundary>]]
- [-s | --signoff] [--diff-options] [--start-number <n>]
++ [-s | --signoff] [<common diff options>] [--start-number <n>]
[--in-reply-to=Message-Id] [--suffix=.<sfx>]
[--ignore-if-in-upstream]
<since>[..<until>]
OPTIONS
-------
+include::diff-options.txt[]
+
-o|--output-directory <dir>::
Use <dir> to store the resulting files, instead of the
current working directory.
Print all commits to the standard output in mbox format,
instead of creating a file for each one.
- --attach::
- Create attachments instead of inlining patches.
+ --attach[=<boundary>]::
+ Create multipart/mixed attachment, the first part of
+ which is the commit message and the patch itself in the
+ second part, with "Content-Disposition: attachment".
+
+ --inline[=<boundary>]::
+ Create multipart/mixed attachment, the first part of
+ which is the commit message and the patch itself in the
+ second part, with "Content-Disposition: inline".
--thread::
Add In-Reply-To and References headers to make the second and
echo "\$ git $cmd"
git $cmd |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
- -e "s/^\\( *boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
+ -e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
- diff -u "$expect" "$actual" &&
+ git diff "$expect" "$actual" &&
rm -f "$actual"
else
# this is to help developing new tests.
format-patch --attach --stdout initial..side
format-patch --attach --stdout initial..master^
format-patch --attach --stdout initial..master
+ format-patch --inline --stdout initial..side
+ format-patch --inline --stdout initial..master^
+ format-patch --inline --stdout initial..master
diff --abbrev initial..side
diff -r initial..side