1. 28 6月, 2009 1 次提交
    • T
      Use die_errno() instead of die() when checking syscalls · 0721c314
      Thomas Rast 提交于
      Lots of die() calls did not actually report the kind of error, which
      can leave the user confused as to the real problem.  Use die_errno()
      where we check a system/library call that sets errno on failure, or
      one of the following that wrap such calls:
      
        Function              Passes on error from
        --------              --------------------
        odb_pack_keep         open
        read_ancestry         fopen
        read_in_full          xread
        strbuf_read           xread
        strbuf_read_file      open or strbuf_read_file
        strbuf_readlink       readlink
        write_in_full         xwrite
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0721c314
  2. 21 6月, 2009 1 次提交
    • L
      Fix various sparse warnings in the git source code · 2af202be
      Linus Torvalds 提交于
      There are a few remaining ones, but this fixes the trivial ones. It boils
      down to two main issues that sparse complains about:
      
       - warning: Using plain integer as NULL pointer
      
         Sparse doesn't like you using '0' instead of 'NULL'. For various good
         reasons, not the least of which is just the visual confusion. A NULL
         pointer is not an integer, and that whole "0 works as NULL" is a
         historical accident and not very pretty.
      
         A few of these remain: zlib is a total mess, and Z_NULL is just a 0.
         I didn't touch those.
      
       - warning: symbol 'xyz' was not declared. Should it be static?
      
         Sparse wants to see declarations for any functions you export. A lack
         of a declaration tends to mean that you should either add one, or you
         should mark the function 'static' to show that it's in file scope.
      
         A few of these remain: I only did the ones that should obviously just
         be made static.
      
      That 'wt_status_submodule_summary' one is debatable. It has a few related
      flags (like 'wt_status_use_color') which _are_ declared, and are used by
      builtin-commit.c. So maybe we'd like to export it at some point, but it's
      not declared now, and not used outside of that file, so 'static' it is in
      this patch.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2af202be
  3. 25 5月, 2009 1 次提交
  4. 19 5月, 2009 1 次提交
  5. 18 5月, 2009 1 次提交
  6. 09 5月, 2009 1 次提交
  7. 06 4月, 2009 1 次提交
  8. 28 3月, 2009 1 次提交
  9. 23 3月, 2009 4 次提交
  10. 22 3月, 2009 1 次提交
  11. 19 3月, 2009 1 次提交
  12. 22 2月, 2009 3 次提交
    • 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
    • T
      format-patch: track several references · b079c50e
      Thomas Rast 提交于
      Currently, format-patch can only track a single reference (the
      In-Reply-To:) for each mail.  To ensure proper threading, we should
      list all known references for every mail.
      
      Change the rev_info.ref_message_id field to a string_list, so that we
      can append references at will, and change the output formatting
      routines to print all of them in the References: header.  The last
      entry in the list is implicitly assumed to be the In-Reply-To:, which
      gives output consistent with RFC 2822:
      
         The "References:" field will contain the contents of the parent's
         "References:" field (if any) followed by the contents of the
         parent's "Message-ID:" field (if any).
      
      Note that this is just preparatory work; nothing uses it yet, so all
      "References:" fields in the output are still only one deep.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b079c50e
  13. 13 2月, 2009 1 次提交
  14. 13 1月, 2009 1 次提交
  15. 11 1月, 2009 1 次提交
    • J
      format-patch: show patch text for the root commit · 68c2ec7f
      Junio C Hamano 提交于
      Even without --root specified, if the range given on the command line
      happens to include a root commit, we should include its patch text in the
      output.
      
      This fix deliberately ignores log.showroot configuration variable because
      "format-patch" and "log -p" can and should behave differently in this
      case, as the former is about exporting a part of your history in a form
      that is replayable elsewhere and just giving the commit log message
      without the patch text does not make any sense for that purpose.
      
      Noticed and fix originally attempted by Nathan W. Panike; credit goes to
      Alexander Potashev for injecting sanity to my initial (broken) fix that
      used the value from log.showroot configuration, which was misguided.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      68c2ec7f
  16. 06 1月, 2009 3 次提交
  17. 01 1月, 2009 1 次提交
  18. 15 12月, 2008 1 次提交
  19. 08 12月, 2008 1 次提交
    • J
      reorder ALLOW_TEXTCONV option setting · 5ec11af6
      Jeff King 提交于
      Right now for the diff porcelain and the log family, we
      call:
      
        init_revisions();
        setup_revisions();
        DIFF_OPT_SET(ALLOW_TEXTCONV);
      
      However, that means textconv will _always_ be on, instead of
      being a default that can be manipulated with
      setup_revisions. Instead, we want:
      
        init_revisions();
        DIFF_OPT_SET(ALLOW_TEXTCONV);
        setup_revisions();
      
      which is what this patch does.
      
      We'll go ahead and move the callsite in wt-status, also;
      even though the user can't pass any options here, it is a
      cleanup that will help avoid any surprise later if the
      setup_revisions line is changed.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5ec11af6
  20. 04 11月, 2008 2 次提交
  21. 27 10月, 2008 1 次提交
    • J
      userdiff: require explicitly allowing textconv · c7534ef4
      Jeff King 提交于
      Diffs that have been produced with textconv almost certainly
      cannot be applied, so we want to be careful not to generate
      them in things like format-patch.
      
      This introduces a new diff options, ALLOW_TEXTCONV, which
      controls this behavior. It is off by default, but is
      explicitly turned on for the "log" family of commands, as
      well as the "diff" porcelain (but not diff-* plumbing).
      
      Because both text conversion and external diffing are
      controlled by these diff options, we can get rid of the
      "plumbing versus porcelain" distinction when reading the
      config. This was an attempt to control the same thing, but
      suffered from being too coarse-grained.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c7534ef4
  22. 18 10月, 2008 1 次提交
  23. 13 10月, 2008 1 次提交
  24. 20 9月, 2008 1 次提交
  25. 05 9月, 2008 2 次提交
  26. 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
  27. 20 8月, 2008 1 次提交
  28. 18 8月, 2008 2 次提交
  29. 15 7月, 2008 1 次提交
  30. 14 7月, 2008 1 次提交
    • S
      Make usage strings dash-less · 1b1dd23f
      Stephan Beyer 提交于
      When you misuse a git command, you are shown the usage string.
      But this is currently shown in the dashed form.  So if you just
      copy what you see, it will not work, when the dashed form
      is no longer supported.
      
      This patch makes git commands show the dash-less version.
      
      For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh
      generates a dash-less usage string now.
      Signed-off-by: NStephan Beyer <s-beyer@gmx.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1b1dd23f