summaryrefslogtreecommitdiff
path: root/connected.c
diff options
context:
space:
mode:
authorLibravatar Stephan Beyer <s-beyer@gmx.net>2016-12-07 22:51:32 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-12-09 14:50:45 -0800
commit1e41229d962b43208e6bf79e729b400c31697cc9 (patch)
tree4c9a5b2eb4277ca20791331e60bdfd65a78134a6 /connected.c
parentt3510: test that cherry-pick --abort does not unsafely change HEAD (diff)
downloadtgif-1e41229d962b43208e6bf79e729b400c31697cc9.tar.xz
sequencer: make sequencer abort safer
In contrast to "git am --abort", a sequencer abort did not check whether the current HEAD is the one that is expected. This can lead to loss of work (when not spotted and resolved using reflog before the garbage collector chimes in). This behavior is now changed by mimicking "git am --abort". The abortion is done but HEAD is not changed when the current HEAD is not the expected HEAD. A new file "sequencer/abort-safety" is added to save the expected HEAD. The new behavior is only active when --abort is invoked on multiple picks. The problem does not occur for the single-pick case because it is handled differently. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connected.c')
0 files changed, 0 insertions, 0 deletions