From: Junio C Hamano Date: Sun, 11 Mar 2007 07:38:18 +0000 (-0800) Subject: Merge branch 'js/attach' X-Git-Tag: v1.5.1-rc1~61 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8a3fbdd9e6c37c74b12fd0e8bd7cde8372861288?ds=inline;hp=-c Merge branch 'js/attach' * js/attach: format-patch --attach: not folding some long headers. format-patch: add --inline option and make --attach a true attachment --- 8a3fbdd9e6c37c74b12fd0e8bd7cde8372861288 diff --combined Documentation/git-format-patch.txt index 84eabebe0b,dfdb65290f..111d7c60bf --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@@ -9,8 -9,9 +9,9 @@@ git-format-patch - Prepare patches for SYNOPSIS -------- [verse] - 'git-format-patch' [] [-n | -k] [-o | --stdout] - [--attach] [--thread] [-s | --signoff] [--start-number ] + 'git-format-patch' [-n | -k] [-o | --stdout] [--thread] + [--attach[=] | --inline[=]] - [-s | --signoff] [--diff-options] [--start-number ] ++ [-s | --signoff] [] [--start-number ] [--in-reply-to=Message-Id] [--suffix=.] [--ignore-if-in-upstream] [..] @@@ -46,8 -47,6 +47,8 @@@ reference OPTIONS ------- +include::diff-options.txt[] + -o|--output-directory :: Use to store the resulting files, instead of the current working directory. @@@ -70,8 -69,15 +71,15 @@@ 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[=]:: + 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[=]:: + 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 diff --combined t/t4013-diff-various.sh index 9f54af5a1b,8345ef5bf7..488e075c16 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@@ -106,12 -106,12 +106,12 @@@ d 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. @@@ -238,6 -238,9 +238,9 @@@ format-patch --stdout initial..maste 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