diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-09-16 00:49:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-09-16 00:49:59 -0700 |
commit | 578421fbd8db6602f290862f44843fc896b4fb0b (patch) | |
tree | 9d83cfd1e69665eca96d2fd3b69845efdea5dca3 /Documentation | |
parent | 8e909f80b41d1a14adede05b4a31f2f2caa56e55 (diff) | |
parent | 5521883490e85f4d973141972cf16f89a79f1979 (diff) | |
download | git-578421fbd8db6602f290862f44843fc896b4fb0b.tar.gz git-578421fbd8db6602f290862f44843fc896b4fb0b.tar.xz |
Merge branch 'jc/maint-checkout-keep-remove'
* jc/maint-checkout-keep-remove:
checkout: do not lose staged removal
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-read-tree.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt index 6f4b9b017..309deac23 100644 --- a/Documentation/git-read-tree.txt +++ b/Documentation/git-read-tree.txt @@ -160,7 +160,10 @@ Here are the "carry forward" rules: 0 nothing nothing nothing (does not happen) 1 nothing nothing exists use M 2 nothing exists nothing remove path from index - 3 nothing exists exists use M + 3 nothing exists exists, use M if "initial checkout" + H == M keep index otherwise + exists fail + H != M clean I==H I==M ------------------ @@ -207,6 +210,12 @@ you picked it up via e-mail in a patch form), `git diff-index merge, but it would not show in `git diff-index --cached $M` output after two-tree merge. +Case #3 is slightly tricky and needs explanation. The result from this +rule logically should be to remove the path if the user staged the removal +of the path and then swiching to a new branch. That however will prevent +the initial checkout from happening, so the rule is modified to use M (new +tree) only when the contents of the index is empty. Otherwise the removal +of the path is kept as long as $H and $M are the same. 3-Way Merge ~~~~~~~~~~~ |