diff options
| author | Andy Koppe <andy.koppe@gmail.com> | 2023-02-26 18:43:54 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-02-27 09:33:20 -0800 |
| commit | ee8a88826af1137f0b192caa39b016032ac96af2 (patch) | |
| tree | 95153ee1300eb2e2c4d039414cb4813a1f68c96f /t/helper/test-run-command.c | |
| parent | 7556e5d737b917d31ac3729b0f5e2391da7e132a (diff) | |
restore: fault --staged --worktree with merge opts
The 'restore' command already rejects the --merge, --conflict, --ours
and --theirs options when combined with --staged, but accepts them when
--worktree is added as well.
Unfortunately that doesn't appear to do anything useful. The --ours and
--theirs options seem to be ignored when both --staged and --worktree
are given, whereas with --merge or --conflict, the command has the same
effect as if the --staged option wasn't present.
So reject those options with '--staged --worktree' as well, using
opts->accept_ref to distinguish restore from checkout.
Add test for both '--staged' and '--staged --worktree'.
Signed-off-by: Andy Koppe <andy.koppe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-run-command.c')
0 files changed, 0 insertions, 0 deletions
