checkout: merge local modifications while switching branches.
authorJunio C Hamano <junkio@cox.net>
Thu, 12 Jan 2006 22:04:36 +0000 (14:04 -0800)
committerJunio C Hamano <junkio@cox.net>
Sat, 14 Jan 2006 00:52:37 +0000 (16:52 -0800)
commit1be0659efca4a1f69c851f95563e930d70d8baf2
tree2141250aceef41362c4bc636c4642690e4afb6fe
parent19205acfc29b6d39b5643a7f9a2448f89df14355
checkout: merge local modifications while switching branches.

 * Instead of going interactive, introduce a command line switch
   '-m' to allow merging changes when normal two-way merge by
   read-tree prevents branch switching.

 * Leave the unmerged stages intact if automerge fails, but
   reset index entries of cleanly merged paths to that of the
   new branch, so that "git diff" (not "git diff HEAD") would
   show the local modifications.

 * Swap the order of trees in read-tree three-way merge used in
   the fallback, so that `git diff` to show the conflicts become
   more natural.

 * Describe the new option and give more examples in the documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-checkout.txt
git-checkout.sh