From: Alexandr Miloslavskiy via GitGitGadget Date: Thu, 19 Dec 2019 18:01:55 GMT Subject: [PATCH v3 18/18] checkout, restore: support the --pathspec-from-file option Message-ID: <7324e091ba7f48e286e6c35c7b7c40490e5c85d1.1576778515.git.gitgitgadget@gmail.com> In-Reply-To: From: Alexandr Miloslavskiy Decisions taken for simplicity: 1) For now, `--pathspec-from-file` is declared incompatible with `--patch`, even when is not `stdin`. Such use case it not really expected. 2) It is not allowed to pass pathspec in both args and file. `you must specify path(s) to restore` block was moved down to be able to test for `pathspec.nr` instead, because testing for `argc` is no longer correct. `git switch` does not support the new options because it doesn't expect `` arguments. Signed-off-by: Alexandr Miloslavskiy --- Documentation/git-checkout.txt | 15 +++++ Documentation/git-restore.txt | 14 +++++ builtin/checkout.c | 33 +++++++++-- t/t2026-checkout-pathspec-file.sh | 90 ++++++++++++++++++++++++++++++ t/t2072-restore-pathspec-file.sh | 91 +++++++++++++++++++++++++++++++ t/t9902-completion.sh | 2 + 6 files changed, 240 insertions(+), 5 deletions(-) create mode 100755 t/t2026-checkout-pathspec-file.sh create mode 100755 t/t2072-restore-pathspec-file.sh diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 93124f3ad9..ffe3c1bff2 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -13,6 +13,7 @@ SYNOPSIS 'git checkout' [-q] [-f] [-m] [--detach] 'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] ] [] 'git checkout' [-f|--ours|--theirs|-m|--conflict=