1. 19 10月, 2012 3 次提交
  2. 25 6月, 2012 1 次提交
  3. 13 6月, 2012 1 次提交
    • V
      t: Replace 'perl' by $PERL_PATH · a3428205
      Vincent van Ravesteijn 提交于
      GIT-BUILD-OPTIONS defines PERL_PATH to be used in the test suite. Only a
      few tests already actually use this variable when perl is needed. The
      other test just call 'perl' and it might happen that the wrong perl
      interpreter is used.
      
      This becomes problematic on Windows, when the perl interpreter that is
      compiled and installed on the Windows system is used, because this perl
      interpreter might introduce some unexpected LF->CRLF conversions.
      
      This patch makes sure that $PERL_PATH is used everywhere in the test suite
      and that the correct perl interpreter is used.
      Signed-off-by: NVincent van Ravesteijn <vfr@lyx.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a3428205
  4. 14 3月, 2012 1 次提交
  5. 04 2月, 2012 1 次提交
  6. 20 9月, 2011 1 次提交
    • J
      t4014: clean up format.thread config after each test · e8107155
      Jeff King 提交于
      The threading tests turn on format.thread, but never clean
      up after themselves, meaning that later tests will also have
      format.thread set.
      
      This is more annoying than most leftover config, too,
      because not only does it impact the results of other tests,
      but it does so non-deterministically. Threading requires the
      generation of message-ids, which incorporate the current
      time, meaning a slow-running test script may generate
      different results from run to run.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e8107155
  7. 13 9月, 2011 1 次提交
  8. 30 8月, 2011 3 次提交
  9. 31 5月, 2011 1 次提交
    • J
      format-patch: make zero-length subject prefixes prettier · e7af8e49
      Jeff King 提交于
      If you give a zero-length subject prefix to format-patch
      (e.g., "format-patch --subject-prefix="), we will print the
      ugly:
      
        Subject: [ 1/2] your subject here
      
      because we always insert a space between the prefix and
      numbering. Requiring the user to provide the space in their
      prefix would be more flexible, but would break existing
      usage. This patch provides a DWIM and suppresses the space
      for zero-length prefixes, under the assumption that nobody
      actually wants "[ 1/2]".
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e7af8e49
  10. 27 4月, 2011 1 次提交
    • J
      pretty: quote rfc822 specials in email addresses · 4d03c18a
      Jeff King 提交于
      If somebody has a name that includes an rfc822 special, we
      will output it literally in the "From:" header. This is
      usually OK, but certain characters (like ".") are supposed
      to be enclosed in double-quotes in a mail header.
      
      In practice, whether this matters may depend on your MUA.
      Some MUAs will happily take in:
      
         From: Foo B. Bar <author@example.com>
      
      without quotes, and properly quote the "." when they send
      the actual mail.  Others may not, or may screw up harder
      things like:
      
        From: Foo "The Baz" Bar <author@example.com>
      
      For example, mutt will strip the quotes, thinking they are
      actual syntactic rfc822 quotes.
      
      So let's quote properly, and then (if necessary) we still
      apply rfc2047 encoding on top of that, which should make all
      MUAs happy.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4d03c18a
  11. 15 4月, 2011 1 次提交
    • J
      format-patch: wrap email addresses after long names · 990f6e30
      Jeff King 提交于
      We already wrap names in "from" headers, which tend to be
      the long part of an address. But it's also possible for a
      long name to not be wrapped, but to make us want to wrap the
      email address. For example (imagine for the sake of
      readability we want to wrap at 50 characters instead of 78):
      
        From: this is my really long git name <foo@example.com>
      
      The name does not overflow the line, but the name and email
      together do. So we would rather see:
      
        From: this is my really long git name
          <git@example.com>
      
      Because we wrap the name separately during add_rfc2047, we
      neglected this case. Instead, we should see how long the
      final line of the wrapped name ended up, and decide whether
      or not to wrap based on that. We can't break the address
      into multiple parts, so we either leave it with the name, or
      put it by itself on a line.
      
      Test by Erik Faye-Lund.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      990f6e30
  12. 14 4月, 2011 1 次提交
  13. 10 3月, 2011 1 次提交
  14. 24 2月, 2011 1 次提交
    • J
      format-patch: wrap long header lines · a1f6baa5
      Jeff King 提交于
      Subject and identity headers may be arbitrarily long. In the
      past, we just assumed that single-line headers would be
      reasonably short. For multi-line subjects that we squish
      into a single line, we just "pre-folded" the data in
      pp_title_line by adding a newline and indentation.
      
      There were two problems. One is that, although rare,
      single-line messages can actually be longer than the
      recommended line-length limits. The second is that the
      pre-folding interacted badly with rfc2047 encoding, leading
      to malformed headers.
      
      Instead, let's stop pre-folding the subject lines, and just
      fold everything based on length in add_rfc2047, whether
      it is encoded or not.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a1f6baa5
  15. 24 11月, 2010 1 次提交
  16. 28 8月, 2010 2 次提交
  17. 17 6月, 2010 1 次提交
    • S
      format-patch: Add a signature option (--signature) · 6622d9c7
      Stephen Boyd 提交于
      By default, git uses the version string as the signature for all
      patches output by format-patch. Many employers (mine included)
      require the use of a signature on all outgoing mails. In a
      format-patch | send-email workflow there isn't an easy way to modify
      the signature without breaking the pipe and manually replacing the
      version string with the signature required. Instead of doing all that
      work, add an option (--signature) and a config variable
      (format.signature) to replace the default git version signature when
      formatting patches.
      
      This does modify the original behavior of format-patch a bit. First
      off the version string is now placed in the cover letter by default.
      Secondly, once the configuration variable format.signature is added
      to the .config file there is no way to revert back to the default
      git version signature. Instead, specifying the --no-signature option
      will remove the signature from the patches entirely.
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6622d9c7
  18. 30 3月, 2010 1 次提交
  19. 09 3月, 2010 1 次提交
    • S
      format-patch: add --no-cc, --no-to, and --no-add-headers · c4260034
      Stephen Boyd 提交于
      These new options allow users to override their config settings for
      format.cc, format.to and format.headers respectively. These options
      only make git ignore the config settings and any previous command line
      options, so you'll still have to add more command line options to add
      extra headers. For example,
      
      	$ cat .git/config
      	[format]
      		to = Someone <someone@out.there>
      	$ git format-patch -1 --no-to --to="Someone Else <else@out.there>"
      
      would format a patch addressed to "Someone Else" and not "Someone".
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c4260034
  20. 07 3月, 2010 1 次提交
  21. 27 1月, 2010 1 次提交
  22. 27 11月, 2009 1 次提交
  23. 23 11月, 2009 1 次提交
  24. 11 11月, 2009 1 次提交
    • B
      format-patch: Always generate a patch · 02bc5b03
      Björn Gustavsson 提交于
      Jeff King recently reinstated -p to suppress the default diffstat
      (as -p used to work before 68daa64d, about 14 months ago).
      
      However, -p is also needed in combination with certain options
      (e.g. --stat or --numstat) in order to produce any patch at all.
      The documentation does not mention this.
      
      Since the purpose of format-patch is to produce a patch that
      can be emailed, it does not make sense that certain combination
      of options will suppress the generation of the patch itself.
      
      Therefore:
      
      * Update 'git format-patch' to always generate a patch.
      
      * Since the --name-only, --name-status, and --check suppresses
        the generation of the patch, disallow those options,
        and remove the description of them in the documentation.
      
      * Remove the reference to -p in the description of -U.
      
      * Remove the descriptions of the options that are synonyms for -p
        plus another option (--patch-with-raw and --patch-with-stat).
      
      * While at it, slightly tweak the description of -p itself
        to say that it generates "plain patches", so that you can
        think of -p as "plain patch" as an mnemonic aid.
      Signed-off-by: NBjörn Gustavsson <bgustavsson@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      02bc5b03
  25. 09 11月, 2009 1 次提交
    • J
      format-patch: make "-p" suppress diffstat · 1d46f2ea
      Jeff King 提交于
      Once upon a time, format-patch would use its default stat
      plus patch format only when no diff format was given on the
      command line. This meant that "format-patch -p" would
      suppress the stat and show just the patch.
      
      Commit 68daa64d changed this to keep the stat format when we
      had an "implicit" patch format, like "-U5". As a side
      effect, this meant that an explicit patch format was now
      ignored (because cmd_format_patch didn't know the reason
      that the format was set way down in diff_opt_parse).
      
      This patch unbreaks what 68daa64d did (while still preserving
      what 68daa64d was trying to do), reinstating "-p" to suppress
      the default behavior. We do this by parsing "-p" ourselves
      in format-patch, and noting whether it was used explicitly.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1d46f2ea
  26. 10 8月, 2009 1 次提交
    • J
      tests: provide $TRASH_DIRECTORY variable · 91c8b825
      Jeff King 提交于
      Most scripts don't care about the absolute path to the trash
      directory. The one exception was t4014 script, which pieced
      together $TEST_DIRECTORY and $test itself to get an absolute
      directory.
      
      Instead, let's provide a $TRASH_DIRECTORY which specifies
      the same thing. This keeps the $test variable internal to
      test-lib.sh and paves the way for trash directories in other
      locations.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      91c8b825
  27. 17 5月, 2009 1 次提交
  28. 28 3月, 2009 1 次提交
  29. 20 3月, 2009 1 次提交
    • J
      test-lib: Introduce test_chmod and use it instead of update-index --chmod · 1f553918
      Johannes Sixt 提交于
      This function replaces sequences of 'chmod +x' and 'git update-index
      --chmod=+x' in the test suite, whose purpose is to help filesystems
      that need core.filemode=false. Two places where only 'chmod +x' was used
      we also use this new function.
      
      The function calls 'git update-index --chmod' without checking
      core.filemode (unlike some of the call sites did). We do this because the
      call sites *expect* that the executable bit ends up in the index (ie. it
      is not the purpose of the call sites to *test* whether git treats
      'chmod +x' and 'update-index --chmod=+x' correctly). Therefore, on
      filesystems with core.filemode=true the 'git update-index --chmod' is a
      no-op.
      
      The function uses --add with update-index to help one call site in
      t6031-merge-recursive. It makes no difference for the other callers.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      1f553918
  30. 22 2月, 2009 2 次提交
    • T
      format-patch: support deep threading · 30984ed2
      Thomas Rast 提交于
      For deep threading mode, i.e., the mode that gives a thread structured
      like
      
        + [PATCH 0/n] Cover letter
         `-+ [PATCH 1/n] First patch
            `-+ [PATCH 2/n] Second patch
               `-+ ...
      
      we currently have to use 'git send-email --thread' (the default).  On
      the other hand, format-patch also has a --thread option which gives
      shallow mode, i.e.,
      
        + [PATCH 0/n] Cover letter
        |-+ [PATCH 1/n] First patch
        |-+ [PATCH 2/n] Second patch
        ...
      
      To reduce the confusion resulting from having two indentically named
      features in different tools giving different results, let format-patch
      take an optional argument '--thread=deep' that gives the same output
      as 'send-mail --thread'.  With no argument, or 'shallow', behave as
      before.  Also add a configuration variable format.thread with the same
      semantics.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      30984ed2
    • T
      format-patch: thread as reply to cover letter even with in-reply-to · 2175c10d
      Thomas Rast 提交于
      Currently, format-patch --thread --cover-letter --in-reply-to $parent
      makes all mails, including the cover letter, a reply to $parent.
      However, we would want the reader to consider the cover letter above
      all the patches.
      
      This changes the semantics so that only the cover letter is a reply to
      $parent, while all the patches are formatted as replies to the cover
      letter.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2175c10d
  31. 20 2月, 2009 1 次提交
    • T
      format-patch: threading test reactivation · 484cf6c3
      Thomas Rast 提交于
      t4014 tests format-patch --thread since 7d812145, but the tests were
      ineffective right from the start at least for bash and dash.  The
      loops of the form
      
        for ...; do something || break; done
      
      introduced by 7d812145 and 5d02294c always exit with status 0, even if
      'something' failed, because 'break' returns 0 unless there was no loop
      to break.
      
      We take a rather different approach that uses an admittedly heinous
      inline Perl script to mangle all interesting information into a format
      that is invariant between runs.  We can then test the full patch
      sequence in one go (with --stdout), doing away with the loop problem.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      484cf6c3
  32. 13 1月, 2009 1 次提交
  33. 27 8月, 2008 1 次提交
    • J
      format-patch: use default diff format even with patch options · 68daa64d
      Jeff King 提交于
      Previously, running "git format-patch -U5" would cause the
      low-level diff machinery to change the diff output format
      from "not specified" to "patch". This meant that
      format-patch thought we explicitly specified a diff output
      format, and would not use the default format. The resulting
      message lacked both the diffstat and the summary, as well as
      the separating "---".
      
      Now format-patch explicitly checks for this condition and
      uses the default. That means that "git format-patch -p" will
      now have the "-p" ignored.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      68daa64d
  34. 15 6月, 2008 1 次提交