Files
git/builtin
Andy Koppe ee8a88826a 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>
2023-02-27 09:33:20 -08:00
..
2022-06-07 14:10:56 -07:00
2020-07-30 19:18:06 -07:00
2022-04-06 09:42:14 -07:00
2022-08-05 15:52:14 -07:00
2022-02-17 16:25:05 -08:00
2023-02-06 09:43:28 +01:00
2021-10-28 09:57:09 -07:00
2022-09-14 12:56:39 -07:00
2022-10-05 12:46:27 -07:00
2022-09-02 10:02:56 -07:00
2022-09-14 12:56:39 -07:00
2021-04-14 13:47:21 -07:00
2022-09-19 14:35:23 -07:00
2022-09-14 12:56:39 -07:00
2022-08-08 13:23:26 -07:00
2022-09-14 12:56:39 -07:00
2021-11-03 13:25:36 -07:00
2020-08-11 18:04:11 -07:00