1. 30 May, 2008 3 commits
    • Junio C Hamano's avatar
      checkout: "best effort" checkout · 291d823e
      Junio C Hamano authored
      When unpack_trees() returned an error while switching branches, we used to
      stop right there, exiting without writing the index out or switching HEAD.
      This is Ok when unpack_trees() returned an error because it detected
      untracked files or locally modified paths that could be overwritten by
      branch switching, because that error return is done before we start to
      modify the work tree.  But it is undesirable if unpack_trees() already
      started to update the work tree and a failure is returned because some but
      not all paths are updated in the work tree, perhaps because a directory
      that some files need to go in was read-only by mistake, or a file that
      will be overwritten by branch switching had a mandatory lock on it and we
      failed to unlink it.
      This changes the behaviour upon such an error to complete the branch
      switching; the files updated in the work tree will hopefully be much more
      consistent with the index and HEAD derived from the switched-to branch.
      We still issue error messages, and exit the command with non-zero status,
      so scripted callers need to notice it.
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    • Junio C Hamano's avatar
      unpack_trees(): allow callers to differentiate worktree errors from merge errors · 2e2b887d
      Junio C Hamano authored
      Instead of uniformly returning -1 on any error, this teaches
      unpack_trees() to return -2 when the merge itself is Ok but worktree
      refuses to get updated.
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    • Junio C Hamano's avatar
      checkout: consolidate reset_{to_new,clean_to_new}() · 6286a08d
      Junio C Hamano authored
      These two were very similar functions with only tiny bit of difference.
      Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
  2. 29 May, 2008 3 commits
  3. 28 May, 2008 15 commits
  4. 27 May, 2008 8 commits
  5. 26 May, 2008 11 commits