summaryrefslogtreecommitdiff
path: root/bundle.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-03-29 10:39:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-02 04:57:00 (GMT)
commitc45f0f525de4701b8ff031d5c2c58c0fa819038e (patch)
tree1b3d321b6c3e269162c36e7463c0ed6e873fa7ca /bundle.h
parent65f099b3988198f0fdf3ef7a21dc01c556d21fff (diff)
downloadgit-c45f0f525de4701b8ff031d5c2c58c0fa819038e.zip
git-c45f0f525de4701b8ff031d5c2c58c0fa819038e.tar.gz
git-c45f0f525de4701b8ff031d5c2c58c0fa819038e.tar.bz2
switch: reject if some operation is in progress
Unless you know what you're doing, switching to another branch to do something then switching back could be confusing. Worse, you may even forget that you're in the middle of something. By the time you realize, you may have done a ton of work and it gets harder to go back. A new option --ignore-in-progress was considered but dropped because it was not exactly clear what should happen. Sometimes you can switch away and get back safely and resume the operation. Sometimes not. And the git-checkout behavior is automatically clear merge/revert/cherry-pick, which makes it a bit even more confusing [1]. We may revisit and add this option in the future. But for now play it safe and not allow it (you can't even skip this check with --force). The user is suggested to cancel the operation by themselves (and hopefully they do consider the consequences, not blindly type the command), or to create a separate worktree instead of switching. The third option is the good old "git checkout", but it's not mentioned. [1] CACsJy8Axa5WsLSjiscjnxVK6jQHkfs-gH959=YtUvQkWriAk5w@mail.gmail.com Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle.h')
0 files changed, 0 insertions, 0 deletions