1. 30 7月, 2008 1 次提交
  2. 10 7月, 2008 1 次提交
  3. 01 7月, 2008 3 次提交
  4. 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
  5. 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
  6. 26 2月, 2008 1 次提交
  7. 19 2月, 2008 1 次提交
  8. 26 11月, 2007 1 次提交
    • J
      add -i: Fix running from a subdirectory · 3f061887
      Junio C Hamano 提交于
      This fixes the pathspec interactive_add() passes to the underlying
      git-add--interactive helper.  When the command was run from a
      subdirectory, cmd_add() already has gone up to the toplevel of the work
      tree, and the helper will be spawned from there.  The pathspec given on
      the command line from the user needs to be adjusted for this.
      
      This adds "validate_pathspec()" function in the callchain, but it does
      not validate yet.  The function can be changed to barf if there are
      unmatching pathspec given by the user, but that is not strictly
      necessary.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      3f061887
  9. 23 11月, 2007 1 次提交
  10. 22 11月, 2007 1 次提交
  11. 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
  12. 06 11月, 2007 1 次提交
    • L
      revision walker: mini clean-up · 53b2c823
      Linus Torvalds 提交于
      This removes the unnecessary indirection of "revs->prune_fn",
      since that function is always the same one (or NULL), and there
      is in fact not even an abstraction reason to make it a function
      (i.e. its not called from some other file and doesn't allow us
      to keep the function itself static or anything like that).
      
      It then just replaces it with a bit that says "prune or not",
      and if not pruning, every commit gets TREECHANGE.
      
      That in turn means that
      
       - if (!revs->prune_fn || (flags & TREECHANGE))
       - if (revs->prune_fn && !(flags & TREECHANGE))
      
      just become
      
       - if (flags & TREECHANGE)
       - if (!(flags & TREECHANGE))
      
      respectively.
      
      Together with adding the "single_parent()" helper function, the "complex"
      conditional now becomes
      
      	if (!(flags & TREECHANGE) && rev->dense && single_parent(commit))
      		continue;
      
      Also indirection of "revs->dense" checking is thrown away the
      same way, because TREECHANGE bit is set appropriately now.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      53b2c823
  13. 04 11月, 2007 1 次提交
    • L
      Simplify topo-sort logic · 23c17d4a
      Linus Torvalds 提交于
      .. by not using quite so much indirection.
      
      This currently grows the "struct commit" a bit, which could be avoided by
      using a union for "util" and "indegree" (the topo-sort used to use "util"
      anyway, so you cannot use them together), but for now the goal of this was
      to simplify, not optimize.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      23c17d4a
  14. 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
  15. 27 9月, 2007 2 次提交
  16. 11 9月, 2007 1 次提交
  17. 04 9月, 2007 1 次提交
  18. 13 6月, 2007 1 次提交
    • J
      Lift 16kB limit of log message output · 80583c0e
      Junio C Hamano 提交于
      Traditionally we had 16kB limit when formatting log messages for
      output, because it was easier to arrange for the caller to have
      a reasonably big buffer and pass it down without ever worrying
      about reallocating.
      
      This changes the calling convention of pretty_print_commit() to
      lift this limit.  Instead of the buffer and remaining length, it
      now takes a pointer to the pointer that points at the allocated
      buffer, and another pointer to the location that stores the
      allocated length, and reallocates the buffer as necessary.
      
      To support the user format, the error return of interpolate()
      needed to be changed.  It used to return a bool telling "Ok the
      result fits", or "Sorry, I had to truncate it".  Now it returns
      0 on success, and returns the size of the buffer it wants in
      order to fit the whole result.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      80583c0e
  19. 08 6月, 2007 1 次提交
  20. 07 6月, 2007 1 次提交
    • J
      War on whitespace · a6080a0a
      Junio C Hamano 提交于
      This uses "git-apply --whitespace=strip" to fix whitespace errors that have
      crept in to our source files over time.  There are a few files that need
      to have trailing whitespaces (most notably, test vectors).  The results
      still passes the test, and build result in Documentation/ area is unchanged.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a6080a0a
  21. 26 4月, 2007 1 次提交
    • J
      Add --date={local,relative,default} · a7b02ccf
      Junio C Hamano 提交于
      This adds --date={local,relative,default} option to log family of commands,
      to allow displaying timestamps in user's local timezone, relative time, or
      the default format.
      
      Existing --relative-date option is a synonym of --date=relative; we could
      probably deprecate it in the long run.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      a7b02ccf
  22. 17 4月, 2007 1 次提交
  23. 23 2月, 2007 1 次提交
    • J
      pretty-formats: add 'format:<string>' · e52a5de4
      Johannes Schindelin 提交于
      With this patch,
      
      $ git show -s \
      	--pretty=format:'  Ze komit %h woss%n  dunn buy ze great %an'
      
      shows something like
      
        Ze komit 04c5c88 woss
        dunn buy ze great Junio C Hamano
      
      The supported placeholders are:
      
      	'%H': commit hash
      	'%h': abbreviated commit hash
      	'%T': tree hash
      	'%t': abbreviated tree hash
      	'%P': parent hashes
      	'%p': abbreviated parent hashes
      	'%an': author name
      	'%ae': author email
      	'%ad': author date
      	'%aD': author date, RFC2822 style
      	'%ar': author date, relative
      	'%at': author date, UNIX timestamp
      	'%cn': committer name
      	'%ce': committer email
      	'%cd': committer date
      	'%cD': committer date, RFC2822 style
      	'%cr': committer date, relative
      	'%ct': committer date, UNIX timestamp
      	'%e': encoding
      	'%s': subject
      	'%b': body
      	'%Cred': switch color to red
      	'%Cgreen': switch color to green
      	'%Cblue': switch color to blue
      	'%Creset': reset color
      	'%n': newline
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e52a5de4
  24. 22 1月, 2007 1 次提交
  25. 10 1月, 2007 1 次提交
  26. 21 12月, 2006 1 次提交
  27. 25 11月, 2006 2 次提交
  28. 29 8月, 2006 1 次提交
  29. 03 7月, 2006 1 次提交
  30. 02 7月, 2006 1 次提交
  31. 30 6月, 2006 1 次提交
  32. 18 6月, 2006 1 次提交
    • L
      Move "void *util" from "struct object" into "struct commit" · d3ff6f55
      Linus Torvalds 提交于
      Every single user actually wanted this only for commit objects, and we
      have no reason to waste space on it for other object types. So just move
      the structure member from the low-level "struct object" into the "struct
      commit".
      
      This leaves the commit object the same size, and removes one unnecessary
      pointer from all other object allocations.
      
      This shrinks memory usage (still at a fairly hefty half-gig, admittedly)
      of "git-rev-list --all --objects" on the mozilla repo by another 5% in my
      tests.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d3ff6f55
  33. 21 5月, 2006 1 次提交
  34. 06 5月, 2006 1 次提交
  35. 19 4月, 2006 1 次提交
  36. 16 4月, 2006 1 次提交
    • J
      Split init_revisions() out of setup_revisions() · 6b9c58f4
      Junio C Hamano 提交于
      Merging all three option parsers related to whatchanged is
      unarguably the right thing, but the fallout was too big to scare
      me away.  Let's try it once again, but once step at time.
      
      This splits out init_revisions() call from setup_revisions(), so
      that the callers can set different defaults to match the
      traditional benaviour.
      
      The rev-list command is still broken in a big way, which is the
      topic of next step.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6b9c58f4