]> git.ipfire.org Git - thirdparty/git.git/commit
restore: reject invalid combinations with --staged
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 25 Apr 2019 09:45:51 +0000 (16:45 +0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 May 2019 04:04:47 +0000 (13:04 +0900)
commite3ddd3b5e583e62d874f56f8c88603ad0ebafd5e
treebc9cfc25295e585703341f8237e3d48727e19862
parent183fb44fd234499ed76d72d745ccb480b25f6d15
restore: reject invalid combinations with --staged

git-checkout rejects plenty of invalid option combinations. Since
git-checkout is equivalent of either

    git restore --source --staged --worktree

or

    git restore --worktree

that still leaves the new mode 'git restore --index' unprotected. Reject
some more invalid option combinations.

The other new mode 'restore --source --worktree' does not need anything
else.

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