1. 09 8月, 2019 4 次提交
  2. 07 8月, 2019 1 次提交
    • E
      merge-recursive: avoid directory rename detection in recursive case · ff6d5477
      Elijah Newren 提交于
      Ever since commit 8c8e5bd6 ("merge-recursive: switch directory
      rename detection default", 2019-04-05), the default handling with
      directory rename detection was to report a conflict and leave unstaged
      entries in the index.  However, when creating a virtual merge base in
      the recursive case, we absolutely need a tree, and the only way a tree
      can be written is if we have no unstaged entries -- otherwise we hit a
      BUG().
      
      There are a few fixes possible here which at least fix the BUG(), but
      none of them seem optimal for other reasons; see the comments with the
      new testcase 13e in t6043 for details (which testcase triggered a BUG()
      prior to this patch).  As such, just opt for a very conservative and
      simple choice that is still relatively reasonable: have the recursive
      case treat 'conflict' as 'false' for opt->detect_directory_renames.
      Reported-by: NEmily Shaffer <emilyshaffer@google.com>
      Signed-off-by: NElijah Newren <newren@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      ff6d5477
  3. 06 8月, 2019 3 次提交
    • D
      commit-graph: fix bug around octopus merges · a35bea40
      Derrick Stolee 提交于
      In 1771be90 "commit-graph: merge commit-graph chains" (2019-06-18),
      the method sort_and_scan_merged_commits() was added to merge the
      commit lists of two commit-graph files in the incremental format.
      Unfortunately, there was an off-by-one error in that method around
      incrementing num_extra_edges, which leads to an incorrect offset
      for the base graph chunk.
      
      When we store an octopus merge in the commit-graph file, we store
      the first parent in the normal place, but use the second parent
      position to point into the "extra edges" chunk where the remaining
      parents exist. This means we should be adding "num_parents - 1"
      edges to this list, not "num_parents - 2". That is the basic error.
      
      The reason this was not caught in the test suite is more subtle.
      In 5324-split-commit-graph.sh, we test creating an octopus merge
      and adding it to the tip of a commit-graph chain, then verify the
      result. This _should_ have caught the problem, except that when
      we load the commit-graph files we were overly careful to not fail
      when the commit-graph chain does not match. This care was on
      purpose to avoid race conditions as one process reads the chain
      and another process modifies it. In such a case, the reading
      process outputs the following message to stderr:
      
      	warning: commit-graph chain does not match
      
      These warnings are output in the test suite, but ignored. By
      checking the stderr of `git commit-graph verify` to include
      the expected progress output, it will now catch this error.
      Signed-off-by: NDerrick Stolee <dstolee@microsoft.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      a35bea40
    • W
      restore: fix typo in docs · 21416f0a
      William Chargin 提交于
      Signed-off-by: NWilliam Chargin <wchargin@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      21416f0a
    • M
      doc: typo: s/can not/cannot/ and s/is does/does/ · 6d169227
      Mark Rushakoff 提交于
      "Can not" suggests one has the option to not do something, whereas
      "cannot" more strongly suggests something is disallowed or impossible.
      
      Noticed "can not", mistakenly used instead of "cannot" in git help
      glossary, then ran git grep 'can not' and found many other instances.
      Only files in the Documentation folder were modified.
      
      'Can not' also occurs in some source code comments and some test
      assertion messages, and there is an error message and translation "can
      not move directory into itself" which I may fix and submit separately
      from the documentation change.
      
      Also noticed and fixed "is does" in git help fetch, but there are no
      other occurrences of that typo according to git grep.
      Signed-off-by: NMark Rushakoff <mark.rushakoff@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6d169227
  4. 03 8月, 2019 6 次提交
    • J
      Git 2.23-rc1 · 7c20df84
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7c20df84
    • J
      Merge branch 'sg/fsck-config-in-doc' · 14fe4af0
      Junio C Hamano 提交于
      Doc update.
      
      * sg/fsck-config-in-doc:
        Documentation/git-fsck.txt: include fsck.* config variables
      14fe4af0
    • J
      Merge branch 'js/visual-studio' · c62bc491
      Junio C Hamano 提交于
      Support building Git with Visual Studio
      
      The bits about .git/branches/* have been dropped from the series.
      We may want to drop the support for it, but until that happens, the
      tests should rely on the existence of the support to pass.
      
      * js/visual-studio: (23 commits)
        git: avoid calling aliased builtins via their dashed form
        bin-wrappers: append `.exe` to target paths if necessary
        .gitignore: ignore Visual Studio's temporary/generated files
        .gitignore: touch up the entries regarding Visual Studio
        vcxproj: also link-or-copy builtins
        msvc: add a Makefile target to pre-generate the Visual Studio solution
        contrib/buildsystems: add a backend for modern Visual Studio versions
        contrib/buildsystems: handle options starting with a slash
        contrib/buildsystems: also handle -lexpat
        contrib/buildsystems: handle libiconv, too
        contrib/buildsystems: handle the curl library option
        contrib/buildsystems: error out on unknown option
        contrib/buildsystems: optionally capture the dry-run in a file
        contrib/buildsystems: redirect errors of the dry run into a log file
        contrib/buildsystems: ignore gettext stuff
        contrib/buildsystems: handle quoted spaces in filenames
        contrib/buildsystems: fix misleading error message
        contrib/buildsystems: ignore irrelevant files in Generators/
        contrib/buildsystems: ignore invalidcontinue.obj
        Vcproj.pm: urlencode '<' and '>' when generating VC projects
        ...
      c62bc491
    • J
      Merge branch 'jc/log-mailmap-flip-defaults' · 9b274e28
      Junio C Hamano 提交于
      Hotfix for making "git log" use the mailmap by default.
      
      * jc/log-mailmap-flip-defaults:
        log: really flip the --mailmap default
        log: flip the --mailmap default unconditionally
      9b274e28
    • J
      Merge branch 'js/early-config-with-onbranch' · e46249f7
      Junio C Hamano 提交于
      The recently added [includeif "onbranch:branch"] feature does not
      work well with an early config mechanism, as it attempts to find
      out what branch we are on before we even haven't located the git
      repository.  The inclusion during early config scan is ignored to
      work around this issue.
      
      * js/early-config-with-onbranch:
        config: work around bug with includeif:onbranch and early config
      e46249f7
    • J
      log: really flip the --mailmap default · f3eda90f
      Junio C Hamano 提交于
      Update the docs, test the interaction between the new default,
      configuration and command line option, in addition to actually
      flipping the default.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f3eda90f
  5. 02 8月, 2019 7 次提交
  6. 01 8月, 2019 9 次提交
    • J
      log: flip the --mailmap default unconditionally · 7ed20f59
      Junio C Hamano 提交于
      It turns out that being cautious to warn against upcoming default
      change was an unpopular behaviour, and such a care can easily be
      defeated by distro packagers to render it ineffective anyway.
      
      Just flip the default, with only a mention in the release notes.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7ed20f59
    • J
      config: work around bug with includeif:onbranch and early config · 85fe0e80
      Johannes Schindelin 提交于
      Since 07b2c0ea (config: learn the "onbranch:" includeIf condition,
      2019-06-05), there is a potential catch-22 in the early config path: if
      the `include.onbranch:` feature is used, Git assumes that the Git
      directory has been initialized already. However, in the early config
      code path that is not true.
      
      One way to trigger this is to call the following commands in any
      repository:
      
      	git config includeif.onbranch:refs/heads/master.path broken
      	git help -a
      
      The symptom triggered by the `git help -a` invocation reads like this:
      
      BUG: refs.c:1851: attempting to get main_ref_store outside of repository
      
      Let's work around this, simply by ignoring the `includeif.onbranch:`
      setting when parsing the config when the ref store has not been
      initialized (yet).
      
      Technically, there is a way to solve this properly: teach the refs
      machinery to initialize the ref_store from a given gitdir/commondir pair
      (which we _do_ have in the early config code path), and then use that in
      `include_by_branch()`. This, however, is a pretty involved project, and
      we're already in the feature freeze for Git v2.23.0.
      
      Note: when calling above-mentioned two commands _outside_ of any Git
      worktree (passing the `--global` flag to `git config`, as there is
      obviously no repository config available), at the point when
      `include_by_branch()` is called, `the_repository` is `NULL`, therefore
      we have to be extra careful not to dereference it in that case.
      Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      85fe0e80
    • J
      A few more last-minute fixes · f36d08d7
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      f36d08d7
    • J
      Merge branch 'cb/xdiff-no-system-includes-in-dot-c' · d163b6ae
      Junio C Hamano 提交于
      Compilation fix.
      
      * cb/xdiff-no-system-includes-in-dot-c:
        xdiff: remove duplicate headers from xpatience.c
        xdiff: remove duplicate headers from xhistogram.c
        xdiff: drop system includes in xutils.c
      d163b6ae
    • J
      Merge branch 'jk/no-system-includes-in-dot-c' · 0bdce880
      Junio C Hamano 提交于
      Compilation fix.
      
      * jk/no-system-includes-in-dot-c:
        wt-status.h: drop stdio.h include
        verify-tag: drop signal.h include
      0bdce880
    • J
      repack: simplify handling of auto-bitmaps and .keep files · 7ff024e7
      Jeff King 提交于
      Commit 73284822 (repack: disable bitmaps-by-default if .keep files
      exist, 2019-06-29) taught repack to prefer disabling bitmaps to
      duplicating objects (unless bitmaps were asked for explicitly).
      
      But there's an easier way to do this: if we keep passing the
      --honor-pack-keep flag to pack-objects when auto-enabling bitmaps, then
      pack-objects already makes the same decision (it will disable bitmaps
      rather than duplicate). Better still, pack-objects can actually decide
      to do so based not just on the presence of a .keep file, but on whether
      that .keep file actually impacts the new pack we're making (so if we're
      racing with a push or fetch, for example, their temporary .keep file
      will not block us from generating bitmaps if they haven't yet updated
      their refs).
      
      And because repack uses the --write-bitmap-index-quiet flag, we don't
      have to worry about pack-objects generating confusing warnings when it
      does see a .keep file. We can confirm this by tweaking the .keep test to
      check repack's stderr.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      7ff024e7
    • J
      repack: silence warnings when auto-enabled bitmaps cannot be built · 25575015
      Jeff King 提交于
      Depending on various config options, a full repack may not be able to
      build a reachability bitmap index (e.g., if pack.packSizeLimit forces us
      to write multiple packs). In these cases pack-objects may write a
      warning to stderr.
      
      Since 36eba032 (repack: enable bitmaps by default on bare repos,
      2019-03-14), we may generate these warnings even when the user did not
      explicitly ask for bitmaps. This has two downsides:
      
        - it can be confusing, if they don't know what bitmaps are
      
        - a daemonized auto-gc will write this to its log file, and the
          presence of the warning may suppress further auto-gc (until
          gc.logExpiry has elapsed)
      
      Let's have repack communicate to pack-objects that the choice to turn on
      bitmaps was not made explicitly by the user, which in turn allows
      pack-objects to suppress these warnings.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      25575015
    • J
      t7700: clean up .keep file in bitmap-writing test · cc2649ae
      Jeff King 提交于
      After our test snippet finishes, the .keep file is left in place, making
      it hard to do further tests of the auto-bitmap-writing code (since it
      suppresses the feature completely). Let's clean it up.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cc2649ae
    • J
      t: sort output of hashmap iteration · e1e7a771
      Jeff King 提交于
      The iteration order of a hashmap is undefined, and may depend on things
      like the exact set of items added, or the table has been grown or
      shrunk. In the case of an oidmap, it even depends on endianness, because
      we take the oid hash by casting sha1 bytes directly into an unsigned
      int.
      
      Let's sort the test-tool output from any hash iterators. In the case of
      t0011, this is just future-proofing. But for t0016, it actually fixes a
      reported failure on the big-endian s390 and nonstop ports.
      
      I didn't bother to teach the helper functions to optionally sort output.
      They are short enough that it's simpler to just repeat them inline for
      the iteration tests than it is to add a --sort option.
      Reported-by: NRandall S. Becker <rsbecker@nexbridge.com>
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e1e7a771
  7. 31 7月, 2019 1 次提交
  8. 30 7月, 2019 9 次提交