chiark / gitweb /
Prevent most commands from running when there are conflicts
When there are conflicts, we want most commands to fail, since the
conflicts conceptually belong to the topmost patch. git read-tree
already checks this for us when we check out a new tree, but there are
operations where the top tree stays the same, e.g. stg new.
This patch inserts a conflict check when the tree to check out is the
same. By default, conflicts will prevent the checkout from succeeding,
but commands can choose to override this if the same patch stays on
top (for some definition of "same").
This change only affects the new-infrastructure commands; the others
always refuse to run when there are local changes of any kind.
Signed-off-by: Karl Hasselström <kha@treskal.com>