From: Nguyễn Thái Ngọc Duy Date: Mon, 15 Nov 2010 10:36:47 GMT Subject: [PATCH 07/10] checkout: add -S to update sparse checkout Message-ID: <1289817410-32470-8-git-send-email-pclouds@gmail.com> In-Reply-To: <1289817410-32470-1-git-send-email-pclouds@gmail.com> The traditional way of updating sparse checkout is to open $GIT_DIR/info/sparse-checkout manually, edit it, save, then run "git checkout" or "git read-tree -m -u HEAD". That's not convenient. "git checkout -S" is introduced to combine those steps in one. It also provides some additional checks: - warn users if core.sparseCheckout is off - refuse to update sparse checkout if there is no valid sparse patterns (faulty sparse-checkout file for example) Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-checkout.txt | 16 +++++++++++++ builtin/checkout.c | 42 +++++++++++++++++++++++++++++++++- t/t1011-read-tree-sparse-checkout.sh | 18 ++++++++++++++ templates/info--sparse-checkout | 1 + 4 files changed, 76 insertions(+), 1 deletions(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 22d3611..478bfe7 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -12,6 +12,7 @@ SYNOPSIS 'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] ] [] 'git checkout' [-f|--ours|--theirs|-m|--conflict=