1. 10 9月, 2017 4 次提交
    • J
      Merge branch 'bw/push-options-recursively-to-submodules' into maint · eba2a68f
      Junio C Hamano 提交于
      "git push --recurse-submodules $there HEAD:$target" was not
      propagated down to the submodules, but now it is.
      
      * bw/push-options-recursively-to-submodules:
        submodule--helper: teach push-check to handle HEAD
      eba2a68f
    • J
      Merge branch 'ma/pager-per-subcommand-action' into maint · 702239d0
      Junio C Hamano 提交于
      The "tag.pager" configuration variable was useless for those who
      actually create tag objects, as it interfered with the use of an
      editor.  A new mechanism has been introduced for commands to enable
      pager depending on what operation is being carried out to fix this,
      and then "git tag -l" is made to run pager by default.
      
      If this works out OK, I think there are low-hanging fruits in
      other commands like "git branch" that outputs long list in one mode
      while taking input in another.
      
      * ma/pager-per-subcommand-action:
        git.c: ignore pager.* when launching builtin as dashed external
        tag: change default of `pager.tag` to "on"
        tag: respect `pager.tag` in list-mode only
        t7006: add tests for how git tag paginates
        git.c: provide setup_auto_pager()
        git.c: let builtins opt for handling `pager.foo` themselves
        builtin.h: take over documentation from api-builtin.txt
      702239d0
    • J
      Merge branch 'jk/rev-list-empty-input' into maint · c2a3bb47
      Junio C Hamano 提交于
      "git log --tag=no-such-tag" showed log starting from HEAD, which
      has been fixed---it now shows nothing.
      
      * jk/rev-list-empty-input:
        revision: do not fallback to default when rev_input_given is set
        rev-list: don't show usage when we see empty ref patterns
        revision: add rev_input_given flag
        t6018: flesh out empty input/output rev-list tests
      c2a3bb47
    • J
      Merge branch 'st/lib-gpg-kill-stray-agent' into maint · 638eb4e7
      Junio C Hamano 提交于
      Some versions of GnuPG fails to kill gpg-agent it auto-spawned
      and such a left-over agent can interfere with a test.  Work it
      around by attempting to kill one before starting a new test.
      
      * st/lib-gpg-kill-stray-agent:
        t: lib-gpg: flush gpg agent on startup
      638eb4e7
  2. 24 8月, 2017 20 次提交
    • J
      Prepare for 2.14.2 · edc74bc7
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      edc74bc7
    • J
      Merge branch 'jt/t1450-fsck-corrupt-packfile' into maint · 0f41b92c
      Junio C Hamano 提交于
      A test update.
      
      * jt/t1450-fsck-corrupt-packfile:
        tests: ensure fsck fails on corrupt packfiles
      0f41b92c
    • J
      Merge branch 'jb/t8008-cleanup' into maint · 86bf8e45
      Junio C Hamano 提交于
      Code clean-up.
      
      * jb/t8008-cleanup:
        t8008: rely on rev-parse'd HEAD instead of sha1 value
      86bf8e45
    • J
      Merge branch 'jt/subprocess-handshake' into maint · df2dd283
      Junio C Hamano 提交于
      Code cleanup.
      
      * jt/subprocess-handshake:
        sub-process: refactor handshake to common function
        Documentation: migrate sub-process docs to header
        convert: add "status=delayed" to filter process protocol
        convert: refactor capabilities negotiation
        convert: move multiple file filter error handling to separate function
        convert: put the flags field before the flag itself for consistent style
        t0021: write "OUT <size>" only on success
        t0021: make debug log file name configurable
        t0021: keep filter log files on comparison
      df2dd283
    • J
      Merge branch 'dc/fmt-merge-msg-microcleanup' into maint · de557036
      Junio C Hamano 提交于
      Code cleanup.
      
      * dc/fmt-merge-msg-microcleanup:
        fmt-merge-msg: fix coding style
      de557036
    • J
      Merge branch 'ah/doc-wserrorhighlight' into maint · b55b9360
      Junio C Hamano 提交于
      Doc update.
      
      * ah/doc-wserrorhighlight:
        doc: add missing values "none" and "default" for diff.wsErrorHighlight
      b55b9360
    • J
      Merge branch 'cc/ref-is-hidden-microcleanup' into maint · d0dffcac
      Junio C Hamano 提交于
      Code cleanup.
      
      * cc/ref-is-hidden-microcleanup:
        refs: use skip_prefix() in ref_is_hidden()
      d0dffcac
    • J
      Merge branch 'js/run-process-parallel-api-fix' into maint · 08692770
      Junio C Hamano 提交于
      API fix.
      
      * js/run-process-parallel-api-fix:
        run_processes_parallel: change confusing task_cb convention
      08692770
    • J
      Merge branch 'rs/pack-objects-pbase-cleanup' into maint · e22a48c4
      Junio C Hamano 提交于
      Code clean-up.
      
      * rs/pack-objects-pbase-cleanup:
        pack-objects: remove unnecessary NULL check
      e22a48c4
    • J
      Merge branch 'jt/fsck-code-cleanup' into maint · 697f11b6
      Junio C Hamano 提交于
      Code clean-up.
      
      * jt/fsck-code-cleanup:
        fsck: cleanup unused variable
        object: remove "used" field from struct object
        fsck: remove redundant parse_tree() invocation
      697f11b6
    • J
      Merge branch 'rs/stat-data-unaligned-reads-fix' into maint · 0d824bc7
      Junio C Hamano 提交于
      Code clean-up.
      
      * rs/stat-data-unaligned-reads-fix:
        dir: support platforms that require aligned reads
      0d824bc7
    • J
      Merge branch 'rs/move-array' into maint · d3b7ee08
      Junio C Hamano 提交于
      Code clean-up.
      
      * rs/move-array:
        ls-files: don't try to prune an empty index
        apply: use COPY_ARRAY and MOVE_ARRAY in update_image()
        use MOVE_ARRAY
        add MOVE_ARRAY
      d3b7ee08
    • J
      Merge branch 'rs/bswap-ubsan-fix' into maint · 752732c6
      Junio C Hamano 提交于
      Code clean-up.
      
      * rs/bswap-ubsan-fix:
        bswap: convert get_be16, get_be32 and put_be32 to inline functions
        bswap: convert to unsigned before shifting in get_be32
      752732c6
    • J
      Merge branch 'dl/credential-cache-socket-in-xdg-cache' into maint · cdc55aad
      Junio C Hamano 提交于
      A recently added test for the "credential-cache" helper revealed
      that EOF detection done around the time the connection to the cache
      daemon is torn down were flaky.  This was fixed by reacting to
      ECONNRESET and behaving as if we got an EOF.
      
      * dl/credential-cache-socket-in-xdg-cache:
        credential-cache: interpret an ECONNRESET as an EOF
      cdc55aad
    • J
      Merge branch 'hb/gitweb-project-list' into maint · b9e56be0
      Junio C Hamano 提交于
      When a directory is not readable, "gitweb" fails to build the
      project list.  Work this around by skipping such a directory.
      
      It might end up hiding a problem under the rug and a better
      solution might be to loudly complain to the administrator pointing
      out the problematic directory, but this will at least make it
      "work".
      
      * hb/gitweb-project-list:
        gitweb: skip unreadable subdirectories
      b9e56be0
    • J
      Merge branch 'ks/commit-abort-on-empty-message-fix' into maint · 01ced489
      Junio C Hamano 提交于
      "git commit" when seeing an totally empty message said "you did not
      edit the message", which is clearly wrong.  The message has been
      corrected.
      
      * ks/commit-abort-on-empty-message-fix:
        commit: check for empty message before the check for untouched template
      01ced489
    • J
      Merge branch 'jk/reflog-walk' into maint · 0cb526e0
      Junio C Hamano 提交于
      Numerous bugs in walking of reflogs via "log -g" and friends have
      been fixed.
      
      * jk/reflog-walk:
        reflog-walk: apply --since/--until to reflog dates
        reflog-walk: stop using fake parents
        rev-list: check reflog_info before showing usage
        get_revision_1(): replace do-while with an early return
        log: do not free parents when walking reflog
        log: clarify comment about reflog cycles
        revision: disallow reflog walking with revs->limited
        t1414: document some reflog-walk oddities
      0cb526e0
    • J
      Merge branch 'jc/http-sslkey-and-ssl-cert-are-paths' into maint · 72140a73
      Junio C Hamano 提交于
      The http.{sslkey,sslCert} configuration variables are to be
      interpreted as a pathname that honors "~[username]/" prefix, but
      weren't, which has been fixed.
      
      * jc/http-sslkey-and-ssl-cert-are-paths:
        http.c: http.sslcert and http.sslkey are both pathnames
      72140a73
    • J
      Merge branch 'jk/ref-filter-colors' into maint · 447f80f5
      Junio C Hamano 提交于
      "%C(color name)" in the pretty print format always produced ANSI
      color escape codes, which was an early design mistake.  They now
      honor the configuration (e.g. "color.ui = never") and also tty-ness
      of the output medium.
      
      * jk/ref-filter-colors:
        ref-filter: consult want_color() before emitting colors
        pretty: respect color settings for %C placeholders
        rev-list: pass diffopt->use_colors through to pretty-print
        for-each-ref: load config earlier
        color: check color.ui in git_default_config()
        ref-filter: pass ref_format struct to atom parsers
        ref-filter: factor out the parsing of sorting atoms
        ref-filter: make parse_ref_filter_atom a private function
        ref-filter: provide a function for parsing sort options
        ref-filter: move need_color_reset_at_eol into ref_format
        ref-filter: abstract ref format into its own struct
        ref-filter: simplify automatic color reset
        t: use test_decode_color rather than literal ANSI codes
        docs/for-each-ref: update pointer to color syntax
        check return value of verify_ref_format()
      447f80f5
    • J
      Merge branch 'js/git-gui-msgfmt-on-windows' into maint · f613b251
      Junio C Hamano 提交于
      Because recent Git for Windows do come with a real msgfmt, the
      build procedure for git-gui has been updated to use it instead of a
      hand-rolled substitute.
      
      * js/git-gui-msgfmt-on-windows:
        git-gui (MinGW): make use of MSys2's msgfmt
        git gui: allow for a long recentrepo list
        git gui: de-dup selected repo from recentrepo history
        git gui: cope with duplicates in _get_recentrepo
        git-gui: remove duplicate entries from .gitconfig's gui.recentrepo
      f613b251
  3. 05 8月, 2017 5 次提交
  4. 04 8月, 2017 7 次提交
    • M
      git.c: ignore pager.* when launching builtin as dashed external · 595d59e2
      Martin Ågren 提交于
      When running, e.g., `git -c alias.bar=foo bar`, we expand the alias and
      execute `git-foo` as a dashed external. This is true even if git foo is
      a builtin. That is on purpose, and is motivated in a comment which was
      added in commit 441981bc ("git: simplify environment save/restore
      logic", 2016-01-26).
      
      Shortly before we launch a dashed external, and unless we have already
      found out whether we should use a pager, we check `pager.foo`. This was
      added in commit 92058e4d ("support pager.* for external commands",
      2011-08-18). If the dashed external is a builtin, this does not match
      that commit's intention and is arguably wrong, since it would be cleaner
      if we let the "dashed external builtin" handle `pager.foo`.
      
      This has not mattered in practice, but a recent patch taught `git-tag`
      to ignore `pager.tag` under certain circumstances. But, when started
      using an alias, it doesn't get the chance to do so, as outlined above.
      That recent patch added a test to document this breakage.
      
      Do not check `pager.foo` before launching a builtin as a dashed
      external, i.e., if we recognize the name of the external as a builtin.
      Change the test to use `test_expect_success`.
      Signed-off-by: NMartin Ågren <martin.agren@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      595d59e2
    • M
      tag: change default of `pager.tag` to "on" · ff1e7248
      Martin Ågren 提交于
      The previous patch taught `git tag` to only respect `pager.tag` in
      list-mode. That patch left the default value of `pager.tag` at "off".
      
      After that patch, it makes sense to let the default value be "on"
      instead, since it will help with listing many tags, but will not hurt
      users of `git tag -a` as it would have before. Make that change. Update
      documentation and tests.
      Signed-off-by: NMartin Ågren <martin.agren@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ff1e7248
    • M
      tag: respect `pager.tag` in list-mode only · de121ffe
      Martin Ågren 提交于
      Using, e.g., `git -c pager.tag tag -a new-tag` results in errors such as
      "Vim: Warning: Output is not to a terminal" and a garbled terminal.
      Someone who makes use of both `git tag -a` and `git tag -l` will
      probably not set `pager.tag`, so that `git tag -a` will actually work,
      at the cost of not paging output of `git tag -l`.
      
      Use the mechanisms introduced in two earlier patches to ignore
      `pager.tag` in git.c and let the `git tag` builtin handle it on its own.
      Only respect `pager.tag` when running in list-mode.
      
      There is a window between where the pager is started before and after
      this patch. This means that early errors can behave slightly different
      before and after this patch. Since operation-parsing has to happen
      inside this window, this can be seen with `git -c pager.tag="echo pager
      is used" tag -l --unknown-option`. This change in paging-behavior should
      be acceptable since it only affects erroneous usages.
      
      Update the documentation and update tests.
      
      If an alias is used to run `git tag -a`, then `pager.tag` will still be
      respected. Document this known breakage. It will be fixed in a later
      commit. Add a similar test for `-l`, which works.
      Noticed-by: NAnatoly Borodin <anatoly.borodin@gmail.com>
      Suggested-by: NJeff King <peff@peff.net>
      Signed-off-by: NMartin Ågren <martin.agren@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      de121ffe
    • M
      t7006: add tests for how git tag paginates · b3ee740c
      Martin Ågren 提交于
      Using, e.g., `git -c pager.tag tag -a new-tag` results in errors such as
      "Vim: Warning: Output is not to a terminal" and a garbled terminal.
      Someone who makes use of both `git tag -a` and `git tag -l` will
      probably not set `pager.tag`, so that `git tag -a` will actually work,
      at the cost of not paging output of `git tag -l`.
      
      Since we're about to change how `git tag` respects `pager.tag`, add tests
      around this, including how the configuration is ignored if --no-pager or
      --paginate are used.
      
      Construct tests with a few different subcommands. First, use -l. Second,
      use "no arguments" and --contains, since those imply -l. (There are
      more arguments which imply -l, but using these two should be enough.)
      
      Third, use -a as a representative for "not -l". Actually, the tests use
      `git tag -am` so no editor is launched, but that is irrelevant, since we
      just want to see whether the pager is used or not. Make one of the tests
      demonstrate the broken behavior mentioned above, where `git tag -a`
      respects `pager.tag`.
      Signed-off-by: NMartin Ågren <martin.agren@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b3ee740c
    • M
      git.c: provide setup_auto_pager() · 033fe3d9
      Martin Ågren 提交于
      The previous patch introduced a way for builtins to declare that they
      will take responsibility for handling the `pager.foo`-config item. (See
      the commit message of that patch for why that could be useful.)
      
      Provide setup_auto_pager(), which builtins can call in order to handle
      `pager.<cmd>`, including possibly starting the pager. Make this function
      don't do anything if a pager has already been started, as indicated by
      use_pager or pager_in_use().
      
      Whenever this function is called from a builtin, git.c will already have
      called commit_pager_choice(). Since commit_pager_choice() treats the
      special value -1 as "punt" or "not yet decided", it is not a problem
      that we might end up calling commit_pager_choice() once in git.c and
      once (or more) in the builtin. Make the new function use -1 in the same
      way and document it as "punt".
      
      Don't add any users of setup_auto_pager just yet, one will follow in
      a later patch.
      Suggested-by: NJeff King <peff@peff.net>
      Signed-off-by: NMartin Ågren <martin.agren@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      033fe3d9
    • M
      git.c: let builtins opt for handling `pager.foo` themselves · c409824c
      Martin Ågren 提交于
      Before launching a builtin git foo and unless mechanisms with precedence
      are in use, we check for and handle the `pager.foo` config. This is done
      without considering exactly how git foo is being used, and indeed, git.c
      cannot (and should not) know what the arguments to git foo are supposed
      to achieve.
      
      In practice this means that, e.g., `git -c pager.tag tag -a new-tag`
      results in errors such as "Vim: Warning: Output is not to a terminal"
      and a garbled terminal. Someone who makes use of both `git tag -a` and
      `git tag -l` will probably not set `pager.tag`, so that `git tag -a`
      will actually work, at the cost of not paging output of `git tag -l`.
      
      To allow individual builtins to make more informed decisions about when
      to respect `pager.foo`, introduce a flag DELAY_PAGER_CONFIG. If the flag
      is set, do not check `pager.foo`.
      
      Do not check for DELAY_PAGER_CONFIG in `execv_dashed_external()`. That
      call site is arguably wrong, although in a way that is not yet visible,
      and will be changed in a slightly different direction in a later patch.
      
      Don't add any users of DELAY_PAGER_CONFIG just yet, one will follow in a
      later patch.
      Suggested-by: NJeff King <peff@peff.net>
      Signed-off-by: NMartin Ågren <martin.agren@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c409824c
    • M
      builtin.h: take over documentation from api-builtin.txt · ec14d4ec
      Martin Ågren 提交于
      Delete Documentation/technical/api-builtin.txt and move its content
      into builtin.h. Format it as a comment. Remove a '+' which was needed
      when the information was formatted for AsciiDoc. Similarly, change
      "::" to ":".
      
      Document SUPPORT_SUPER_PREFIX, thereby bringing the documentation up to
      date with the available flags.
      
      While at it, correct '3 more things to do' to '4 more things to do'.
      Signed-off-by: NMartin Ågren <martin.agren@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ec14d4ec
  5. 03 8月, 2017 4 次提交
    • J
      revision: do not fallback to default when rev_input_given is set · 5d34d1ac
      Jeff King 提交于
      If revs->def is set (as it is in "git log") and there are no
      pending objects after parsing the user's input, then we show
      whatever is in "def". But if the user _did_ ask for some
      input that just happened to be empty (e.g., "--glob" that
      does not match anything), showing the default revision is
      confusing. We should just show nothing, as that is what the
      user's request yielded.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5d34d1ac
    • J
      rev-list: don't show usage when we see empty ref patterns · 0159ba32
      Jeff King 提交于
      If the user gives us no starting point for a traversal, we
      want to complain with our normal usage message. But if they
      tried to do so with "--all" or "--glob", but that happened
      not to match any refs, the usage message isn't helpful. We
      should just give them the empty output they asked for
      instead.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0159ba32
    • J
      revision: add rev_input_given flag · 7ba82629
      Jeff King 提交于
      Normally a caller that invokes setup_revisions() has to
      check rev.pending to see if anything was actually queued for
      the traversal. But they can't tell the difference between
      two cases:
      
        1. The user gave us no tip from which to start a
           traversal.
      
        2. The user tried to give us tips via --glob, --all, etc,
           but their patterns ended up being empty.
      
      Let's set a flag in the rev_info struct that callers can use
      to tell the difference.  We can set this from the
      init_all_refs_cb() function.  That's a little funny because
      it's not exactly about initializing the "cb" struct itself.
      But that function is the common setup place for doing
      pattern traversals that is used by --glob, --all, etc.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7ba82629
    • J
      t6018: flesh out empty input/output rev-list tests · 0c5dc743
      Jeff King 提交于
      In 751a2ac6 (rev-list --exclude: tests, 2013-11-01), we
      added a few tests for handling "empty" inputs with rev-list
      (i.e., where the user gave us some pattern but it turned out
      not to queue any objects for traversal), all of which were
      marked as failing.
      
      In preparation for working on this area of the code, let's
      give each test a more descriptive name. Let's also include
      one more case which we should cover: feeding a --glob
      pattern that doesn't match anything.
      
      We can also drop the explanatory comment; we'll be
      converting these to expect_success in the next few patches,
      so the discussion isn't necessary.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      0c5dc743