1. 20 10月, 2009 1 次提交
    • T
      Refactor pretty_print_commit arguments into a struct · dd2e794a
      Thomas Rast 提交于
      pretty_print_commit() has a bunch of rarely-used arguments, and
      introducing more of them requires yet another update of all the call
      sites.  Refactor most of them into a struct to make future extensions
      easier.
      
      The ones that stay "plain" arguments were chosen on the grounds that
      all callers put real arguments there, whereas some callers have 0/NULL
      for all arguments that were factored into the struct.
      
      We declare the struct 'const' to ensure none of the callers are bitten
      by the changed (no longer call-by-value) semantics.
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dd2e794a
  2. 13 10月, 2009 1 次提交
  3. 30 9月, 2009 1 次提交
    • J
      improve reflog date/number heuristic · f4ea32f0
      Jeff King 提交于
      When we show a reflog, we have two ways of naming the entry:
      by sequence number (e.g., HEAD@{0}) or by date (e.g.,
      HEAD@{10 minutes ago}). There is no explicit option to set
      one or the other, but we guess based on whether or not the
      user has provided us with a date format, showing them the
      date version if they have done so, and the sequence number
      otherwise.
      
      This usually made sense if the use did something like "git
      log -g --date=relative". However, it didn't make much sense
      if the user set the date format using the log.date config
      variable; in that case, all of their reflogs would end up as
      dates.
      
      This patch records the source of the date format and only
      triggers the date-based view if --date= was given on the
      command line.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      f4ea32f0
  4. 27 8月, 2009 1 次提交
  5. 19 8月, 2009 1 次提交
  6. 11 8月, 2009 1 次提交
  7. 02 7月, 2009 1 次提交
  8. 14 5月, 2009 1 次提交
  9. 27 3月, 2009 1 次提交
  10. 23 3月, 2009 2 次提交
  11. 08 3月, 2009 1 次提交
  12. 22 2月, 2009 1 次提交
    • 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. 14 2月, 2009 1 次提交
    • T
      log: do not print ellipses with --abbrev-commit · 7fcda920
      Thomas Rast 提交于
      'git log --abbrev-commit' added an ellipsis to all commit names that
      were abbreviated.  This was particularly annoying if you wanted to
      cut&paste the sha1 from the terminal, since selecting by word would
      pick up '...'  too.
      
      So use find_unique_abbrev() instead of diff_unique_abbrev() in all
      log-related commit sha1 printing routines, and also change the
      formatting of the 'Merge: parent1 parent2' line output via
      pretty_print_commit().
      Signed-off-by: NThomas Rast <trast@student.ethz.ch>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7fcda920
  14. 16 11月, 2008 1 次提交
    • L
      Fix machine-parseability of 'git log --source' · 8c4021ab
      Linus Torvalds 提交于
      The space between the commit and the source attribute is not easily
      machine-parseable: if we combine --source with --parents and give a SHA1
      as a starting point, it's unnecessarily hard to see where the list of
      parents ends and the source decoration begins.
      
      Example:
      	git show --parents --source $(git rev-list HEAD)
      
      which is admittedly contrived, but can easily happen in scripting.
      
      So use a <tab> instead of a space as the source separator.
      
      The other decorations didn't have this issue, because they were surrounded
      by parenthesis, so it's obvious that they aren't parent SHA1's.
      
      It so happens that _visually_ this makes no difference for "git log
      --source", since "commit <40-char SHA1>" is 47 characters, so both a space
      and a <tab> will end up showing as a single commit. Of course, with
      '--pretty=oneline' or '--parents' or '--abbrev-commit' you'll see the
      difference.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8c4021ab
  15. 04 11月, 2008 2 次提交
  16. 13 10月, 2008 1 次提交
  17. 05 9月, 2008 1 次提交
  18. 18 8月, 2008 1 次提交
  19. 30 7月, 2008 1 次提交
    • K
      format-patch: Produce better output with --inline or --attach · 6b2fbaaf
      Kevin Ballard 提交于
      This patch makes two small changes to improve the output of --inline
      and --attach.
      
      The first is to write a newline preceding the boundary. This is needed because
      MIME defines the encapsulation boundary as including the preceding CRLF (or in
      this case, just LF), so we should be writing one. Without this, the last
      newline in the pre-diff content is consumed instead.
      
      The second change is to always write the line termination character
      (default: newline) even when using --inline or --attach. This is simply to
      improve the aesthetics of the resulting message. When using --inline an email
      client should render the resulting message identically to the non-inline
      version. And when using --attach this adds a blank line preceding the
      attachment in the email, which is visually attractive.
      Signed-off-by: NKevin Ballard <kevin@sb.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6b2fbaaf
  20. 26 5月, 2008 1 次提交
    • A
      log --graph --left-right: show left/right information in place of '*' · 7528f27d
      Adam Simpkins 提交于
      With the --graph option, the graph already outputs 'o' instead of '*'
      for boundary commits.  Make it emit '<' or '>' when --left-right is
      specified.
      
      (This change also disables the '^' prefix for UNINTERESTING commits.
      The graph code currently doesn't print anything special for these
      commits, since it assumes no UNINTERESTING, non-BOUNDARY commits are
      displayed.  This is potentially a bug if UNINTERESTING non-BOUNDARY
      commits can actually be displayed via some code path.)
      
      [jc: squashed the left-right change from Dscho and Adam's fixup into one]
      Signed-off-by: NAdam Simpkins <adam@adamsimpkins.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7528f27d
  21. 06 5月, 2008 2 次提交
  22. 04 5月, 2008 2 次提交
  23. 10 4月, 2008 1 次提交
    • J
      log: teach "terminator" vs "separator" mode to "--pretty=format" · 4da45bef
      Junio C Hamano 提交于
      This attached patch introduces a single bit "use_terminator" in "struct
      rev_info", which is normally false (i.e. most formats use separator
      semantics) but by flipping it to true, you can ask for terminator
      semantics just like oneline format does.
      
      The function get_commit_format(), which is what parses "--pretty=" option,
      now takes a pointer to "struct rev_info" and updates its commit_format and
      use_terminator fields.  It used to return the value of type "enum
      cmit_fmt", but all the callers assigned it to rev->commit_format.
      
      There are only two cases the code turns use_terminator on.  Obviously, the
      traditional oneline format (--pretty=oneline) is one of them, and the new
      case is --pretty=tformat:... that acts like --pretty=format:... but flips
      the bit on.
      
      With this, "--pretty=tformat:%H %s" acts like --pretty=oneline.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4da45bef
  24. 23 3月, 2008 1 次提交
  25. 15 3月, 2008 1 次提交
    • J
      format-patch: generate MIME header as needed even when there is format.header · 6bf4f1b4
      Junio C Hamano 提交于
      Earlier, the callchain from pretty_print_commit() down to pp_title_line()
      had an unwarranted assumption that the presense of "after_subject"
      parameter, means the caller has already output MIME headers for
      attachments.  The parameter's primary purpose is to give extra header
      lines the caller wants to place after pp_title_line() generates the
      "Subject: " line.
      
      This assumption does not hold when the user used the format.header
      configuration variable to pass extra headers, and caused a message with
      non-ASCII character to lack proper MIME headers (e.g.  8-bit CTE header).
      The earlier logic also failed to suppress duplicated MIME headers when
      "format-patch -s --attach" is asked for and the signer's name demanded
      8-bit clean transport.
      
      This patch fixes the logic by introducing a separate need_8bit_cte
      parameter passed down the callchain.  This can have one of these values:
      
       -1 : we've already done MIME crap and we do not want to add extra header
            to say this is 8bit in pp_title_line();
      
        0 : we haven't done MIME and we have not seen anything that is 8bit yet;
      
        1 : we haven't done MIME and we have seen something that is 8bit;
            pp_title_line() must add MIME header.
      
      It adds two tests by Jeff King who independently diagnosed this issue.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6bf4f1b4
  26. 19 2月, 2008 1 次提交
  27. 14 2月, 2008 1 次提交
    • L
      Add "--show-all" revision walker flag for debugging · 3131b713
      Linus Torvalds 提交于
      It's really not very easy to visualize the commit walker, because - on
      purpose - it obvously doesn't show the uninteresting commits!
      
      This adds a "--show-all" flag to the revision walker, which will make
      it show uninteresting commits too, and they'll have a '^' in front of
      them (it also fixes a logic error for !verbose_header for boundary
      commits - we should show the '-' even if left_right isn't shown).
      
      A separate patch to gitk to teach it the new '^' was sent
      to paulus.  With the change in place, it actually is interesting
      even for the cases that git doesn't have any problems with, ie
      for the kernel you can do:
      
      	gitk -d --show-all v2.6.24..
      
      and you see just how far down it has to parse things to see it all. The
      use of "-d" is a good idea, since the date-ordered toposort is much better
      at showing why it goes deep down (ie the date of some of those commits
      after 2.6.24 is much older, because they were merged from trees that
      weren't rebased).
      
      So I think this is a useful feature even for non-debugging - just to
      visualize what git does internally more.
      
      When it actually breaks out due to the "everybody_uninteresting()"
      case, it adds the uninteresting commits (both the one it's looking at
      now, and the list of pending ones) to the list
      
      This way, we really list *all* the commits we've looked at.
      
      Because we now end up listing commits we may not even have been parsed
      at all "show_log" and "show_commit" need to protect against commits
      that don't have a commit buffer entry.
      
      That second part is debatable just how it should work. Maybe we shouldn't
      show such entries at all (with this patch those entries do get shown, they
      just don't get any message shown with them). But I think this is a useful
      case.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3131b713
  28. 12 11月, 2007 1 次提交
  29. 08 11月, 2007 1 次提交
    • J
      format-patch -s: add MIME encoding header if signer's name requires so · acef41c9
      Junio C Hamano 提交于
      When the body of the commit log message contains a non-ASCII character,
      format-patch correctly emitted the encoding header to mark the resulting
      message as such.  However, if the original message was fully ASCII, the
      command line switch "-s" was given to add a new sign-off, and
      the signer's name was not ASCII only, the resulting message would have
      contained non-ASCII character but was not marked as such.
      
      This was cherry-picked from the fix in 'master'
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      acef41c9
  30. 02 11月, 2007 1 次提交
    • J
      format-patch -s: add MIME encoding header if signer's name requires so · 4593fb84
      Junio C Hamano 提交于
      When the body of the commit log message contains a non-ASCII character,
      format-patch correctly emitted the encoding header to mark the resulting
      message as such.  However, if the original message was fully ASCII, the
      command line switch "-s" was given to add a new sign-off, and
      the signer's name was not ASCII only, the resulting message would have
      contained non-ASCII character but was not marked as such.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4593fb84
  31. 27 10月, 2007 1 次提交
  32. 16 10月, 2007 1 次提交
  33. 26 9月, 2007 1 次提交
  34. 11 9月, 2007 1 次提交
  35. 14 8月, 2007 1 次提交
  36. 05 7月, 2007 1 次提交