All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: me@ttaylorr.com, peff@peff.net, newren@gmail.com,
	Derrick Stolee <dstolee@microsoft.com>
Subject: [PATCH 0/4] Sparse-checkout: Add subcommand and Windows paths
Date: Tue, 11 Feb 2020 15:02:20 +0000	[thread overview]
Message-ID: <pull.546.git.1581433344.gitgitgadget@gmail.com> (raw)

This is based on ds/sparse-checkout-harden.

The sparse-checkout builtin currently lets users modify their
sparse-checkout file with the all-or-nothing "set" subcommand. It may be
easier for a user to expand their sparse cone using a "git sparse-checkout
add <pattern/path> ..." subcommand. To achieve this while reusing as much
code as possible from the "set" subcommand, the first two patches extract
methods from sparse_checkout_set().

As part of this "add" subcommand, I created a modify_pattern_list() method
that serves as the core interaction with the sparse-checkout file and
working directory. It changes how it constructs the in-memory pattern list
based on an "enum modify_type" that only has two options: REPLACE and ADD.
This could be extended with REMOVE in a later update. I started building the
REMOVE logic, but it was more complicated than ADD, and I didn't have time
to finish it right now due to other obligations.

Finally, a Windows user contacted me about using Windows-style paths when in
cone mode to add a nested directory. This case is fixed and tested in the
final patch.

Thanks, -Stolee

Derrick Stolee (4):
  sparse-checkout: extract add_patterns_from_input()
  sparse-checkout: extract pattern update from 'set' subcommand
  sparse-checkout: create 'add' subcommand
  sparse-checkout: work with Windows paths

 Documentation/git-sparse-checkout.txt |   7 ++
 builtin/sparse-checkout.c             | 141 ++++++++++++++++++++------
 t/t1091-sparse-checkout-builtin.sh    |  73 +++++++++++++
 3 files changed, 189 insertions(+), 32 deletions(-)


base-commit: f998a3f1e588d73ed7285cb14ac4839f63f6dc82
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-546%2Fderrickstolee%2Fsparse-add-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-546/derrickstolee/sparse-add-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/546
-- 
gitgitgadget

             reply	other threads:[~2020-02-11 15:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 15:02 Derrick Stolee via GitGitGadget [this message]
2020-02-11 15:02 ` [PATCH 1/4] sparse-checkout: extract add_patterns_from_input() Derrick Stolee via GitGitGadget
2020-02-11 16:56   ` Junio C Hamano
2020-02-11 15:02 ` [PATCH 2/4] sparse-checkout: extract pattern update from 'set' subcommand Derrick Stolee via GitGitGadget
2020-02-11 15:02 ` [PATCH 3/4] sparse-checkout: create 'add' subcommand Derrick Stolee via GitGitGadget
2020-02-11 17:05   ` Junio C Hamano
2020-02-11 15:02 ` [PATCH 4/4] sparse-checkout: work with Windows paths Derrick Stolee via GitGitGadget
2020-02-11 17:06 ` [PATCH 0/4] Sparse-checkout: Add subcommand and " Junio C Hamano
2020-02-11 19:48 ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.546.git.1581433344.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.