author | Junio C Hamano <gitster@pobox.com> | |
Fri, 25 Dec 2009 08:30:51 +0000 (00:30 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 26 Dec 2009 01:10:10 +0000 (17:10 -0800) | ||
commit | cfc5789ada444423232fa1533f401b5972eb3f6c | |
tree | 8a2ecdd8e946c0766d276d69b0d0693dffa1837a | tree | snapshot |
parent | be6ff8196d9890c1875a75b96320b863dd1fe815 | commit | diff |
resolve-undo: record resolved conflicts in a new index extension section
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: Junio C Hamano <gitster@pobox.com>
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: Junio C Hamano <gitster@pobox.com>
Makefile | diff | blob | history | |
builtin-checkout.c | diff | blob | history | |
builtin-merge.c | diff | blob | history | |
builtin-read-tree.c | diff | blob | history | |
cache.h | diff | blob | history | |
read-cache.c | diff | blob | history | |
resolve-undo.c | [new file with mode: 0644] | blob |
resolve-undo.h | [new file with mode: 0644] | blob |