Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-12-25 21:31:26 +0300
committerJunio C Hamano <gitster@pobox.com>2009-12-26 04:10:10 +0300
commit4a39f79d3482cd844443b4ef9a8ef9b3d72faa5b (patch)
tree0755156205fdd15cb3a72224e5ebc718f40f9a3e /t/t2030-unresolve-info.sh
parent9d9a2f4aba3650093bad952cd89e276cde4ed074 (diff)
resolve-undo: allow plumbing to clear the information
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: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2030-unresolve-info.sh')
-rwxr-xr-xt/t2030-unresolve-info.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh
index 785c8b3fca..984480271c 100755
--- a/t/t2030-unresolve-info.sh
+++ b/t/t2030-unresolve-info.sh
@@ -85,4 +85,16 @@ test_expect_success 'rm records reset clears' '
check_resolve_undo discarded
'
+test_expect_success 'plumbing clears' '
+ prime_resolve_undo &&
+ test_tick &&
+ git commit -m merged &&
+ echo committing keeps &&
+ check_resolve_undo kept file initial:file second:file third:file &&
+
+ echo plumbing clear &&
+ git update-index --clear-resolve-undo &&
+ check_resolve_undo cleared
+'
+
test_done