1. 06 11月, 2007 1 次提交
  2. 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
  3. 16 10月, 2007 1 次提交
  4. 29 9月, 2007 1 次提交
    • P
      strbuf change: be sure ->buf is never ever NULL. · b315c5c0
      Pierre Habouzit 提交于
      For that purpose, the ->buf is always initialized with a char * buf living
      in the strbuf module. It is made a char * so that we can sloppily accept
      things that perform: sb->buf[0] = '\0', and because you can't pass "" as an
      initializer for ->buf without making gcc unhappy for very good reasons.
      
      strbuf_init/_detach/_grow have been fixed to trust ->alloc and not ->buf
      anymore.
      
      as a consequence strbuf_detach is _mandatory_ to detach a buffer, copying
      ->buf isn't an option anymore, if ->buf is going to escape from the scope,
      and eventually be free'd.
      
      API changes:
        * strbuf_setlen now always works, so just make strbuf_reset a convenience
          macro.
        * strbuf_detatch takes a size_t* optional argument (meaning it can be
          NULL) to copy the buffer's len, as it was needed for this refactor to
          make the code more readable, and working like the callers.
      Signed-off-by: NPierre Habouzit <madcoder@debian.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b315c5c0
  5. 26 9月, 2007 1 次提交
  6. 21 9月, 2007 1 次提交
    • P
      strbuf API additions and enhancements. · c76689df
      Pierre Habouzit 提交于
      Add strbuf_remove, change strbuf_insert:
        As both are special cases of strbuf_splice, implement them as such.
        gcc is able to do the math and generate almost optimal code this way.
      
      Add strbuf_swap:
        Exchange the values of its arguments.
        Use it in fast-import.c
      
      Also fix spacing issues in strbuf.h
      Signed-off-by: NPierre Habouzit <madcoder@debian.org>
      c76689df
  7. 19 9月, 2007 1 次提交
  8. 17 9月, 2007 2 次提交
  9. 11 9月, 2007 2 次提交
  10. 04 9月, 2007 1 次提交
  11. 22 7月, 2007 1 次提交
  12. 14 7月, 2007 2 次提交
  13. 17 6月, 2007 1 次提交
  14. 13 6月, 2007 3 次提交
    • J
      More static · 4175e9e3
      Junio C Hamano 提交于
      There still are quite a few symbols that ought to be static.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4175e9e3
    • J
      Extend --pretty=oneline to cover the first paragraph, · 4234a761
      Junio C Hamano 提交于
      so that an ugly commit message like this can be
      handled sanely.
      
      Currently, --pretty=oneline and --pretty=email (hence
      format-patch) take and use only the first line of the commit log
      message.  This changes them to:
      
       - Take the first paragraph, where the definition of the first
         paragraph is "skip all blank lines from the beginning, and
         then grab everything up to the next empty line".
      
       - Replace all line breaks with a whitespace.
      
      This change would not affect a well-behaved commit message that
      adheres to the convention of "single line summary, a blank line,
      and then body of message", as its first paragraph always
      consists of a single line.  Commit messages from different
      culture, such as the ones imported from CVS/SVN, can however get
      chomped with the existing behaviour at the first linebreak in
      the middle of sentence right now, which would become much easier
      to see with this change.
      
      The Subject: and --pretty=oneline output would become very long
      and unsightly for non-conforming commits, but their messages are
      already ugly anyway, and thischange at least avoids the loss of
      information.
      
      The Subject: line from a multi-line paragraph is folded using
      RFC2822 line folding rules at the places where line breaks were
      in the original.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4234a761
    • 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
  15. 08 6月, 2007 1 次提交
  16. 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
  17. 03 6月, 2007 1 次提交
  18. 17 5月, 2007 1 次提交
  19. 06 5月, 2007 1 次提交
  20. 04 5月, 2007 1 次提交
  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. 12 4月, 2007 1 次提交
  24. 29 3月, 2007 3 次提交
  25. 28 3月, 2007 1 次提交
  26. 20 3月, 2007 1 次提交
  27. 08 3月, 2007 1 次提交
    • S
      General const correctness fixes · 3a55602e
      Shawn O. Pearce 提交于
      We shouldn't attempt to assign constant strings into char*, as the
      string is not writable at runtime.  Likewise we should always be
      treating unsigned values as unsigned values, not as signed values.
      
      Most of these are very straightforward.  The only exception is the
      (unnecessary) xstrdup/free in builtin-branch.c for the detached
      head case.  Since this is a user-level interactive type program
      and that particular code path is executed no more than once, I feel
      that the extra xstrdup call is well worth the easy elimination of
      this warning.
      Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      3a55602e
  28. 27 2月, 2007 1 次提交
    • N
      convert object type handling from a string to a number · 21666f1a
      Nicolas Pitre 提交于
      We currently have two parallel notation for dealing with object types
      in the code: a string and a numerical value.  One of them is obviously
      redundent, and the most used one requires more stack space and a bunch
      of strcmp() all over the place.
      
      This is an initial step for the removal of the version using a char array
      found in object reading code paths.  The patch is unfortunately large but
      there is no sane way to split it in smaller parts without breaking the
      system.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      21666f1a
  29. 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
  30. 03 2月, 2007 1 次提交
  31. 14 1月, 2007 1 次提交
  32. 10 1月, 2007 1 次提交
  33. 09 1月, 2007 1 次提交