1. 18 2月, 2013 2 次提交
  2. 16 2月, 2013 1 次提交
  3. 15 2月, 2013 20 次提交
  4. 14 2月, 2013 1 次提交
  5. 13 2月, 2013 9 次提交
  6. 12 2月, 2013 5 次提交
    • E
      parse-options: report uncorrupted multi-byte options · b141a478
      Erik Faye-Lund 提交于
      Because our command-line parser considers only one byte at the time
      for short-options, we incorrectly report only the first byte when
      multi-byte input was provided. This makes user-errors slightly
      awkward to diagnose for instance under UTF-8 locale and non-English
      keyboard layouts.
      
      Report the whole argument-string when a non-ASCII short-option is
      detected.
      Signed-off-by: NErik Faye-Lund <kusmabite@gmail.com>
      Improved-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b141a478
    • M
      Allow building with xmlparse.h · 081fd8d0
      Matt Kraai 提交于
      expat 1.1 and 1.2 provide xmlparse.h instead of expat.h.  Include the
      former on systems that define the EXPAT_NEEDS_XMLPARSE_H variable and
      define that variable on QNX systems, which ship with expat 1.1.
      Signed-off-by: NMatt Kraai <matt.kraai@amo.abbott.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      081fd8d0
    • J
      log: re-encode commit messages before grepping · 04deccda
      Jeff King 提交于
      If you run "git log --grep=foo", we will run your regex on
      the literal bytes of the commit message. This can provide
      confusing results if the commit message is not in the same
      encoding as your grep expression (or worse, you have commits
      in multiple encodings, in which case your regex would need
      to be written to match either encoding). On top of this, we
      might also be grepping in the commit's notes, which are
      already re-encoded, potentially leading to grepping in a
      buffer with mixed encodings concatenated. This is insanity,
      but most people never noticed, because their terminal and
      their commit encodings all match.
      
      Instead, let's massage the to-be-grepped commit into a
      standardized encoding. There is not much point in adding a
      flag for "this is the encoding I expect my grep pattern to
      match"; the only sane choice is for it to use the log output
      encoding. That is presumably what the user's terminal is
      using, and it means that the patterns found by the grep will
      match the output produced by git.
      
      As a bonus, this fixes a potential segfault in commit_match
      when commit->buffer is NULL, as we now build on logmsg_reencode,
      which handles reading the commit buffer from disk if
      necessary. The segfault can be triggered with:
      
              git commit -m 'text1' --allow-empty
              git commit -m 'text2' --allow-empty
              git log --graph --no-walk --grep 'text2'
      
      which arguably does not make any sense (--graph inherently
      wants a connected history, and by --no-walk the command line
      is telling us to show discrete points in history without
      connectivity), and we probably should forbid the
      combination, but that is a separate issue.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      04deccda
    • J
      Add utf8_fprintf helper that returns correct number of columns · c0821965
      Jiang Xin 提交于
      Since command usages can be translated, they may include utf-8
      encoded strings, and the output in console may not align well any
      more. This is because strlen() is different from strwidth() on utf-8
      strings.
      
      A wrapper utf8_fprintf() can help to return the correct number of
      columns required.
      Signed-off-by: NJiang Xin <worldhello.net@gmail.com>
      Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com>
      Reviewed-by: NTorsten Bögershausen <tboegi@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c0821965
    • M
      git-bisect.txt: clarify that reset quits bisect · c787a454
      Michael J Gruber 提交于
      "reset" can be easily misunderstood as resetting a bisect session to its
      start without finishing it. Clarify that it actually quits the bisect
      session.
      Reported-by: NAndreas Mohr <andi@lisas.de>
      Signed-off-by: NMichael J Gruber <git@drmicha.warpmail.net>
      Reviewed-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c787a454
  7. 11 2月, 2013 2 次提交