switch: add --discard-changes
commit3ec37ad13dea55f6a614753accc7fad84cb170be
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 29 Mar 2019 10:39:07 +0000 (29 17:39 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Apr 2019 04:56:59 +0000 (2 13:56 +0900)
treebf3fb6056dc4d0e9e2513de09f5518970a94ec28
parentb7b5fce2701c12895f75f8e716c629b45f105b0c
switch: add --discard-changes

--discard-changes is a better name than --force for this option since
it's what really happens. --force is turned to an alias for
--discard-changes. But it's meant to be an alias for potentially more
force options in the future.

Side note. It's not obvious from the patch but --discard-changes also
affects submodules if --recurse-submodules is used. The knob to force
updating submodules is hidden behind unpack-trees.c

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c