1. 21 10月, 2014 7 次提交
  2. 17 10月, 2014 3 次提交
  3. 16 10月, 2014 2 次提交
  4. 15 10月, 2014 16 次提交
    • J
      color_parse: do not mention variable name in error message · f6c5a296
      Jeff King 提交于
      Originally the color-parsing function was used only for
      config variables. It made sense to pass the variable name so
      that the die() message could be something like:
      
        $ git -c color.branch.plain=bogus branch
        fatal: bad color value 'bogus' for variable 'color.branch.plain'
      
      These days we call it in other contexts, and the resulting
      error messages are a little confusing:
      
        $ git log --pretty='%C(bogus)'
        fatal: bad color value 'bogus' for variable '--pretty format'
      
        $ git config --get-color foo.bar bogus
        fatal: bad color value 'bogus' for variable 'command line'
      
      This patch teaches color_parse to complain only about the
      value, and then return an error code. Config callers can
      then propagate that up to the config parser, which mentions
      the variable name. Other callers can provide a custom
      message. After this patch these three cases now look like:
      
        $ git -c color.branch.plain=bogus branch
        error: invalid color value: bogus
        fatal: unable to parse 'color.branch.plain' from command-line config
      
        $ git log --pretty='%C(bogus)'
        error: invalid color value: bogus
        fatal: unable to parse --pretty format
      
        $ git config --get-color foo.bar bogus
        error: invalid color value: bogus
        fatal: unable to parse default color value
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f6c5a296
    • J
      pass config slots as pointers instead of offsets · 8852117a
      Jonathan Nieder 提交于
      Many config-parsing helpers, like parse_branch_color_slot,
      take the name of a config variable and an offset to the
      "slot" name (e.g., "color.branch.plain" is passed along with
      "13" to effectively pass "plain"). This is leftover from the
      time that these functions would die() on error, and would
      want the full variable name for error reporting.
      
      These days they do not use the full variable name at all.
      Passing a single pointer to the slot name is more natural,
      and lets us more easily adjust the callers to use skip_prefix
      to avoid manually writing offset numbers.
      
      This is effectively a continuation of 9e1a5ebe, which did the
      same for parse_diff_color_slot. This patch covers all of the
      remaining similar constructs.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8852117a
    • J
      Update draft release notes to 2.2 · 670a3c1d
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      670a3c1d
    • J
      Merge branch 'bc/asciidoc-pretty-formats-fix' · 337233c5
      Junio C Hamano 提交于
      * bc/asciidoc-pretty-formats-fix:
        Documentation: fix misrender of pretty-formats in Asciidoctor
      337233c5
    • J
      Merge branch 'rs/plug-leak-in-bundle' · 0189df31
      Junio C Hamano 提交于
      * rs/plug-leak-in-bundle:
        bundle: plug minor memory leak in is_tag_in_date_range()
      0189df31
    • J
      Merge branch 'rs/more-uses-of-skip-prefix' · 145c590d
      Junio C Hamano 提交于
      * rs/more-uses-of-skip-prefix:
        use skip_prefix() to avoid more magic numbers
      145c590d
    • J
      Merge branch 'rs/mailsplit' · 63434da0
      Junio C Hamano 提交于
      * rs/mailsplit:
        mailsplit: remove unnecessary unlink(2) call
      63434da0
    • J
      Merge branch 'rs/sha1-array-test' · 40e2d8db
      Junio C Hamano 提交于
      * rs/sha1-array-test:
        sha1-lookup: handle duplicates in sha1_pos()
        sha1-array: add test-sha1-array and basic tests
      40e2d8db
    • J
      Merge branch 'mh/lockfile-stdio' · 11cb3130
      Junio C Hamano 提交于
      * mh/lockfile-stdio:
        commit_packed_refs(): reimplement using fdopen_lock_file()
        dump_marks(): reimplement using fdopen_lock_file()
        fdopen_lock_file(): access a lockfile using stdio
      11cb3130
    • J
      Merge branch 'mh/lockfile' · bd107e10
      Junio C Hamano 提交于
      The lockfile API and its users have been cleaned up.
      
      * mh/lockfile: (38 commits)
        lockfile.h: extract new header file for the functions in lockfile.c
        hold_locked_index(): move from lockfile.c to read-cache.c
        hold_lock_file_for_append(): restore errno before returning
        get_locked_file_path(): new function
        lockfile.c: rename static functions
        lockfile: rename LOCK_NODEREF to LOCK_NO_DEREF
        commit_lock_file_to(): refactor a helper out of commit_lock_file()
        trim_last_path_component(): replace last_path_elm()
        resolve_symlink(): take a strbuf parameter
        resolve_symlink(): use a strbuf for internal scratch space
        lockfile: change lock_file::filename into a strbuf
        commit_lock_file(): use a strbuf to manage temporary space
        try_merge_strategy(): use a statically-allocated lock_file object
        try_merge_strategy(): remove redundant lock_file allocation
        struct lock_file: declare some fields volatile
        lockfile: avoid transitory invalid states
        git_config_set_multivar_in_file(): avoid call to rollback_lock_file()
        dump_marks(): remove a redundant call to rollback_lock_file()
        api-lockfile: document edge cases
        commit_lock_file(): rollback lock file on failure to rename
        ...
      bd107e10
    • J
      Merge branch 'sk/tag-contains-wo-recursion' · 7543dea8
      Junio C Hamano 提交于
      * sk/tag-contains-wo-recursion:
        t7004: give the test a bit more stack space
      7543dea8
    • J
      Merge branch 'da/completion-show-signature' · cc7b2f82
      Junio C Hamano 提交于
      * da/completion-show-signature:
        completion: add --show-signature for log and show
      cc7b2f82
    • J
      Merge branch 'rs/daemon-fixes' · dc11fc2d
      Junio C Hamano 提交于
      "git daemon" (with NO_IPV6 build configuration) used to incorrectly
      use the hostname even when gethostbyname() reported that the given
      hostname is not found.
      
      * rs/daemon-fixes:
        daemon: remove write-only variable maxfd
        daemon: fix error message after bind()
        daemon: handle gethostbyname() error
      dc11fc2d
    • J
      Merge branch 'dt/cache-tree-repair' · e2ebb5c4
      Junio C Hamano 提交于
      This fixes a topic that has graduated to 'master'.
      
      * dt/cache-tree-repair:
        t0090: avoid passing empty string to printf %d
      e2ebb5c4
    • J
      Merge branch 'so/rebase-doc-fork-point' · 792a5723
      Junio C Hamano 提交于
      * so/rebase-doc-fork-point:
        Documentation/git-rebase.txt: document when --fork-point is auto-enabled
      792a5723
    • J
      Merge branch 'da/include-compat-util-first-in-c' · 211836f7
      Junio C Hamano 提交于
      Code clean-up.
      
      * da/include-compat-util-first-in-c:
        cleanups: ensure that git-compat-util.h is included first
      211836f7
  5. 14 10月, 2014 7 次提交
  6. 11 10月, 2014 3 次提交
  7. 10 10月, 2014 1 次提交
    • J
      completion: use "git -C $there" instead of (cd $there && git ...) · fca416a4
      Junio C Hamano 提交于
      We have had "git -C $there" to first go to a different directory
      and run a Git command without changing the arguments for quite some
      time.  Use it instead of (cd $there && git ...) in the completion
      script.
      
      This allows us to lose the work-around for misfeatures of modern
      interactive-minded shells that make "cd" unusable in scripts (e.g.
      end users' $CDPATH taking us to unexpected places in any POSIX
      shell, and chpwd functions spewing unwanted output in zsh).
      
      Based on Øystein Walle's idea, which was raised during the
      discussion on the solution by Brandon Turner for a problem zsh users
      had with RVM which mucks with chpwd_functions in users' environments
      (https://github.com/wayneeseguin/rvm/issues/3076).
      
      As $root variable, which is used to direct where to chdir to, is set
      to "." based on if $2 to __git_index_files is set (not if it is empty),
      the only caller of the function is fixed not to pass the optional $2
      when it does not want us to switch to a different directory.  Otherwise
      we would end up doing "git -C '' command...", which would not work.
      
      Maybe we would want "git -C '' command..." to mean "do not chdir
      anywhere", but that is a spearate topic.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fca416a4
  8. 09 10月, 2014 1 次提交