1. 11 4月, 2010 1 次提交
  2. 17 1月, 2010 1 次提交
  3. 11 1月, 2010 2 次提交
    • J
      rerere forget path: forget recorded resolution · dea4562b
      Junio C Hamano 提交于
      After you find out an earlier resolution you told rerere to use was a
      mismerge, there is no easy way to clear it.  A new subcommand "forget" can
      be used to tell git to forget a recorded resolution, so that you can redo
      the merge from scratch.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dea4562b
    • J
      rerere: refactor rerere logic to make it independent from I/O · 27d6b085
      Junio C Hamano 提交于
      This splits the handle_file() function into in-core part and I/O
      parts of the logic to create the preimage, so that we can compute
      the conflict identifier without having to use temporary files.
      
      Earlier, I thought the output from handle_file() should also be
      refactored, but it is always about writing preimage (or thisimage)
      that is used for later three-way merge, so it is saner to keep it
      to always write to FILE *.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      27d6b085
  4. 26 12月, 2009 7 次提交
    • J
      rerere: remove silly 1024-byte line limit · d58ee6db
      Junio C Hamano 提交于
      Ever since 658f3650 (Make git-rerere a builtin, 2006-12-20) rewrote it, it
      kept this line-length limit regression, even after we started using strbuf
      in the same function in 19b358e8 (Use strbuf API in buitin-rerere.c,
      2007-09-06).
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d58ee6db
    • J
      resolve-undo: teach "update-index --unresolve" to use resolve-undo info · 8aa38563
      Junio C Hamano 提交于
      The update-index plumbing command had a hacky --unresolve implementation
      that was written back in the days when merge was the only way for users to
      end up with higher stages in the index, and assumed that stage #2 must
      have come from HEAD, stage #3 from MERGE_HEAD and didn't bother to compute
      the stage #1 information.
      
      There were several issues with this approach:
      
       - These days, merge is not the only command, and conflicts coming from
         commands like cherry-pick, "am -3", etc. cannot be recreated by looking
         at MERGE_HEAD;
      
       - For a conflict that came from a merge that had renames, picking up the
         same path from MERGE_HEAD and HEAD wouldn't help recreating it, either;
      
       - It may have been Ok not to recreate stage #1 back when it was written,
         because "diff --ours/--theirs" were the only availble ways to review
         conflicts and they don't need stage #1 information.  "diff --cc" that
         was invented much later is a lot more useful way but it needs stage #1.
      
      We can use resolve-undo information recorded in the index extension to
      solve all of these issues.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8aa38563
    • J
      resolve-undo: "checkout -m path" uses resolve-undo information · 4421a823
      Junio C Hamano 提交于
      Once you resolved conflicts by "git add path", you cannot recreate the
      conflicted state with "git checkout -m path", because you lost information
      from higher stages in the index when you resolved them.
      
      Since we record the necessary information in the resolve-undo index
      extension these days, we can reproduce the unmerged state in the index and
      check it out.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4421a823
    • J
      resolve-undo: allow plumbing to clear the information · 4a39f79d
      Junio C Hamano 提交于
      At the Porcelain level, operations such as merge that populate an
      initially cleanly merged index with conflicted entries clear the
      resolve-undo information upfront.  Give scripted Porcelains a way
      to do the same, by implementing "update-index --clear-resolve-info".
      
      With this, a scripted Porcelain may "update-index --clear-resolve-info"
      first and repeatedly run "update-index --cacheinfo" to stuff unmerged
      entries to the index, to be resolved by the user with "git add" and
      stuff.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      4a39f79d
    • J
      resolve-undo: basic tests · 9d9a2f4a
      Junio C Hamano 提交于
      Make sure that resolving a failed merge with git add records
      the conflicted state, committing the result keeps that state,
      and checking out another commit clears the state.
      
      "git ls-files" learns a new option --resolve-undo to show the
      recorded information.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9d9a2f4a
    • J
      resolve-undo: record resolved conflicts in a new index extension section · cfc5789a
      Junio C Hamano 提交于
      When resolving a conflict using "git add" to create a stage #0 entry, or
      "git rm" to remove entries at higher stages, remove_index_entry_at()
      function is eventually called to remove unmerged (i.e. higher stage)
      entries from the index.  Introduce a "resolve_undo_info" structure and
      keep track of the removed cache entries, and save it in a new index
      extension section in the index_state.
      
      Operations like "read-tree -m", "merge", "checkout [-m] <branch>" and
      "reset" are signs that recorded information in the index is no longer
      necessary.  The data is removed from the index extension when operations
      start; they may leave conflicted entries in the index, and later user
      actions like "git add" will record their conflicted states afresh.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cfc5789a
    • J
      builtin-merge.c: use standard active_cache macros · be6ff819
      Junio C Hamano 提交于
      Instead of using the low-level index_state interface, use the bog standard
      active_cache and active_nr macros to access the cache entries when using the
      default one.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      be6ff819
  5. 24 12月, 2009 3 次提交
  6. 23 12月, 2009 3 次提交
  7. 22 12月, 2009 1 次提交
  8. 21 12月, 2009 8 次提交
  9. 20 12月, 2009 4 次提交
  10. 18 12月, 2009 2 次提交
  11. 17 12月, 2009 5 次提交
    • J
      Git 1.6.6-rc3 · 94058a90
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      94058a90
    • J
      Merge branch 'maint' to sync with 1.6.5.7 · a1bb8f45
      Junio C Hamano 提交于
      * maint:
        Git 1.6.5.7
        worktree: don't segfault with an absolute pathspec without a work tree
        ignore unknown color configuration
        help.autocorrect: do not run a command if the command given is junk
        Illustrate "filter" attribute with an example
      a1bb8f45
    • J
      Git 1.6.5.7 · 527b9d70
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      527b9d70
    • J
      worktree: don't segfault with an absolute pathspec without a work tree · b3100fd5
      Junio C Hamano 提交于
      If a command is run with an absolute path as a pathspec inside a bare
      repository, e.g. "rev-list HEAD -- /home", the code tried to run strlen()
      on NULL, which is the result of get_git_work_tree(), and segfaulted.  It
      should just fail instead.
      
      Currently the function returns NULL even inside .git/ in a repository
      with a work tree, but that is a separate issue.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      b3100fd5
    • J
      ignore unknown color configuration · 8b8e8624
      Jeff King 提交于
      When parsing the config file, if there is a value that is
      syntactically correct but unused, we generally ignore it.
      This lets non-core porcelains store arbitrary information in
      the config file, and it means that configuration files can
      be shared between new and old versions of git (the old
      versions might simply ignore certain configuration).
      
      The one exception to this is color configuration; if we
      encounter a color.{diff,branch,status}.$slot variable, we
      die if it is not one of the recognized slots (presumably as
      a safety valve for user misconfiguration). This behavior
      has existed since 801235c5 (diff --color: use
      $GIT_DIR/config, 2006-06-24), but hasn't yet caused a
      problem. No porcelain has wanted to store extra colors, and
      we once a color area (like color.diff) has been introduced,
      we've never changed the set of color slots.
      
      However, that changed recently with the addition of
      color.diff.func. Now a user with color.diff.func in their
      config can no longer freely switch between v1.6.6 and older
      versions; the old versions will complain about the existence
      of the variable.
      
      This patch loosens the check to match the rest of
      git-config; unknown color slots are simply ignored. This
      doesn't fix this particular problem, as the older version
      (without this patch) is the problem, but it at least
      prevents it from happening again in the future.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8b8e8624
  12. 16 12月, 2009 1 次提交
    • J
      help.autocorrect: do not run a command if the command given is junk · 06500a02
      Johannes Sixt 提交于
      If a given command is not found, then help.c tries to guess which one the
      user could have meant. If help.autocorrect is 0 or unset, then a list of
      suggestions is given as long as the dissimilarity between the given command
      and the candidates is not excessively high. But if help.autocorrect was
      non-zero (i.e., a delay after which the command is run automatically), the
      latter restriction on dissimilarity was not obeyed.
      
      In my case, this happened:
      
       $ git ..daab02
       WARNING: You called a Git command named '..daab02', which does not exist.
       Continuing under the assumption that you meant 'read-tree'
       in 4.0 seconds automatically...
      
      The patch reuses the similarity limit that is also applied when the list of
      suggested commands is printed.
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      06500a02
  13. 15 12月, 2009 1 次提交
  14. 13 12月, 2009 1 次提交