1. 29 1月, 2010 8 次提交
  2. 28 1月, 2010 13 次提交
  3. 27 1月, 2010 15 次提交
  4. 26 1月, 2010 4 次提交
    • S
      am: fix patch format detection for Thunderbird "Save As" emails · e3f67d30
      Stephen Boyd 提交于
      The patch detection wants to inspect all the headers of a rfc2822 message
      and ensure that they look like header fields. The headers are always
      separated from the message body with a blank line. When Thunderbird saves
      the message the blank line separating the headers from the body includes a
      CR. The patch detection is failing because a CRLF doesn't match /^$/. Fix
      this by allowing a CR to exist on the separating line.
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e3f67d30
    • S
      t0022: replace non-portable literal CR · f4e6dcc3
      Stephen Boyd 提交于
      We shouldn't have literal CR's in tests as they aren't portable.
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f4e6dcc3
    • S
      tests: consolidate CR removal/addition functions · c4f3f551
      Stephen Boyd 提交于
      append_cr(), remove_cr(), q_to_nul() and q_to_cr() are defined in multiple
      tests. Consolidate them into test-lib.sh so we can stop redefining them.
      The use of remove_cr() in t0020 to test for a CR is replaced with a new
      function has_cr() to accurately reflect what is intended (the output of
      remove_cr() was being thrown away).
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c4f3f551
    • J
      grep: expose "status-only" feature via -q · c8610a2e
      Junio C Hamano 提交于
      Teach "git grep" a new "-q" option to report the presense of a match via
      its exit status without showing any output, similar to how "grep -q"
      works.  Internally "grep" engine already knew this "status-only" mode of
      operation because it needed to grep inside log message to filter commits
      when called from the "git log" machinery, and this patch only exposes it
      to the command line tool.
      
      A somewhat unfair benchmark in the Linux kernel directory shows a dramatic
      improvement:
      
          (with patch)
          $ time ../git.git/git grep -q linux HEAD ; echo $?
      
          real    0m0.030s
          user    0m0.004s
          sys     0m0.004s
          0
      
          (without patch)
          $ time git grep linux HEAD >/dev/null; echo $?
      
          real    0m4.432s
          user    0m4.272s
          sys     0m0.076s
          0
      
      This is "somewhat unfair" because I knew a file with such a string comes
      very early in the tree traversal (namely, ".gitignore").
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c8610a2e