Merge branch 'js/attach'
authorJunio C Hamano <junkio@cox.net>
Sun, 11 Mar 2007 07:38:18 +0000 (23:38 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 11 Mar 2007 07:38:18 +0000 (23:38 -0800)
* js/attach:
format-patch --attach: not folding some long headers.
format-patch: add --inline option and make --attach a true attachment

1  2 
Documentation/git-format-patch.txt
t/t4013-diff-various.sh
index 84eabebe0bc767112805d2d35c68ad000d8e1003,dfdb65290fc121087df698826033020c3e8542ed..111d7c60bf1832bbfc27f8b819da77b8761236da
@@@ -9,8 -9,9 +9,9 @@@ git-format-patch - Prepare patches for 
  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>]
@@@ -46,8 -47,6 +47,8 @@@ reference
  
  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
diff --combined t/t4013-diff-various.sh
index 9f54af5a1b56b05ed4eb3ea388ac87f80473ab2e,8345ef5bf76cbf9ce2cebd962fa36c1f7ce445da..488e075c16611e5e6132744939574cdd878c3959
                        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