1. 27 11月, 2009 1 次提交
  2. 23 11月, 2009 1 次提交
  3. 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
  4. 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
  5. 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
  6. 17 5月, 2009 1 次提交
  7. 28 3月, 2009 1 次提交
  8. 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
  9. 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
  10. 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
  11. 13 1月, 2009 1 次提交
  12. 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
  13. 15 6月, 2008 1 次提交
  14. 24 5月, 2008 1 次提交
  15. 03 3月, 2008 2 次提交
  16. 24 2月, 2008 1 次提交
  17. 20 2月, 2008 5 次提交
  18. 19 2月, 2008 1 次提交
  19. 19 9月, 2007 1 次提交
  20. 26 5月, 2007 1 次提交
  21. 29 6月, 2006 1 次提交
  22. 28 6月, 2006 1 次提交
  23. 27 6月, 2006 1 次提交