1. 23 6月, 2011 5 次提交
    • J
      strbuf: allow strbuf_split to work on non-strbufs · 2f1d9e2b
      Jeff King 提交于
      The strbuf_split function takes a strbuf as input, and
      outputs a list of strbufs. However, there is no reason that
      the input has to be a strbuf, and not an arbitrary buffer.
      
      This patch adds strbuf_split_buf for a length-delimited
      buffer, and strbuf_split_str for NUL-terminated strings.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2f1d9e2b
    • J
      config: avoid segfault when parsing command-line config · c5d6350b
      Jeff King 提交于
      We already check for an empty key on the left side of an
      equals, but we would segfault if there was no content at
      all.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c5d6350b
    • J
      config: die on error in command-line config · 1c2c9bee
      Jeff King 提交于
      The error handling for git_config is somewhat confusing. We
      collect errors from running git_config_from_file on the
      various config files and carefully pass them back up. But
      the two odd things are:
      
        1. We actually die on most errors in git_config_from_file.
           In fact, the only error we actually pass back up is if
           fopen() fails on the file.
      
        2. Most callers of git_config do not check the error
           return at all, but will continue if git_config reports
           an error.
      
      When the code for "git -c core.foo=bar" was added, it
      dutifully passed errors up the call stack, only for them to
      be eventually ignored. This makes it inconsistent with the
      file-parsing code, which will die when it sees malformed
      config. And it's somewhat unsafe, because it means an error
      in parsing a typo like:
      
        git -c clean.requireforce=ture clean
      
      will continue the command, ignoring the config the user
      tried to give.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1c2c9bee
    • J
      fix "git -c" parsing of values with equals signs · 5bf6529a
      Jeff King 提交于
      If you do something like:
      
        git -c core.foo="value with = in it" ...
      
      we would split your option on "=" into three fields and
      throw away the third one. With this patch we correctly take
      everything after the first "=" as the value (keys cannot
      have an equals sign in them, so the parsing is unambiguous).
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5bf6529a
    • J
      strbuf_split: add a max parameter · 28fc3a68
      Jeff King 提交于
      Sometimes when splitting, you only want a limited number of
      fields, and for the final field to contain "everything
      else", even if it includes the delimiter.
      
      This patch introduces strbuf_split_max, which provides a
      "max number of fields" parameter; it behaves similarly to
      perl's "split" with a 3rd field.
      
      The existing 2-argument form of strbuf_split is retained for
      compatibility and ease-of-use.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      28fc3a68
  2. 02 6月, 2011 7 次提交
  3. 01 6月, 2011 7 次提交
    • J
      Start 1.7.5.4 draft release notes · 2b0b64ee
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2b0b64ee
    • J
      Merge branch 'tr/add-i-no-escape' into maint · 1618297f
      Junio C Hamano 提交于
      * tr/add-i-no-escape:
        add -i: ignore terminal escape sequences
      1618297f
    • J
      Merge branch 'vh/config-interactive-singlekey-doc' into maint · 398dbe53
      Junio C Hamano 提交于
      * vh/config-interactive-singlekey-doc:
        git-reset.txt: better docs for '--patch'
        git-checkout.txt: better docs for '--patch'
        git-stash.txt: better docs for '--patch'
        git-add.txt: document 'interactive.singlekey'
        config.txt: 'interactive.singlekey; is used by...
      398dbe53
    • J
      Merge branch 'ml/test-readme' into maint · 82ca0909
      Junio C Hamano 提交于
      * ml/test-readme:
        t/README: unify documentation of test function args
      82ca0909
    • J
      Merge branch 'ab/i18n-fixup' into maint · dd4c0ce9
      Junio C Hamano 提交于
      * ab/i18n-fixup: (24 commits)
        i18n: use test_i18n{cmp,grep} in t7600, t7607, t7611 and t7811
        i18n: use test_i18n{grep,cmp} in t7508
        i18n: use test_i18ngrep in t7506
        i18n: use test_i18ngrep and test_i18ncmp in t7502
        i18n: use test_i18ngrep in t7501
        i18n: use test_i18ncmp in t7500
        i18n: use test_i18ngrep in t7201
        i18n: use test_i18ncmp and test_i18ngrep in t7102 and t7110
        i18n: use test_i18ncmp and test_i18ngrep in t5541, t6040, t6120, t7004, t7012 and t7060
        i18n: use test_i18ncmp and test_i18ngrep in t3700, t4001 and t4014
        i18n: use test_i18ncmp and test_i18ngrep in t3203, t3501 and t3507
        i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200
        i18n: use test_i18ngrep in lib-httpd and t2019
        i18n: do not overuse C_LOCALE_OUTPUT (grep)
        i18n: use test_i18ncmp in t1200 and t2200
        i18n: .git file is not a human readable message (t5601)
        i18n: do not overuse C_LOCALE_OUTPUT
        i18n: mark init-db messages for translation
        i18n: mark checkout plural warning for translation
        i18n: mark checkout --detach messages for translation
        ...
      dd4c0ce9
    • J
      Merge branch 'jc/rename-degrade-cc-to-c' into maint · b3c89315
      Junio C Hamano 提交于
      * jc/rename-degrade-cc-to-c:
        diffcore-rename: fall back to -C when -C -C busts the rename limit
        diffcore-rename: record filepair for rename src
        diffcore-rename: refactor "too many candidates" logic
        builtin/diff.c: remove duplicated call to diff_result_code()
      b3c89315
    • J
      Merge branch 'rr/doc-content-type' into maint · e596fd29
      Junio C Hamano 提交于
      * rr/doc-content-type:
        Documentation: Allow custom diff tools to be specified in 'diff.tool'
        Documentation: Add diff.<driver>.* to config
        Documentation: Move diff.<driver>.* from config.txt to diff-config.txt
        Documentation: Add filter.<driver>.* to config
      e596fd29
  4. 31 5月, 2011 1 次提交
  5. 30 5月, 2011 4 次提交
  6. 28 5月, 2011 1 次提交
  7. 27 5月, 2011 15 次提交