git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Brown, Chris" <chris.c.brown@siemens.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Negative patterns in cone mode
Date: Tue, 4 Apr 2023 12:00:18 +0000	[thread overview]
Message-ID: <GVXPR10MB8199D186532A7A285CCF1538B9939@GVXPR10MB8199.EURPRD10.PROD.OUTLOOK.COM> (raw)

Hi all,

I'm facing an issue with negative patterns in cone mode. I can't tell from the docs or git code if I misunderstand the usage, am trying something not supported, or if there is a bug.

What I want to do is exclude a small number of directories (and their subdirectories) from a large repo, without explicitly declaring all the other directories that I wish to keep.

My directory structure is:
root
^----A
        ^----B
        ^----C

My sparse-checkout file is:
/*
!/A/B/

I've set up an MRE:
1. git clone --sparse https://github.com/peakschris/sparse.git
2. cd sparse
3. copy sparse-checkout.txt .git\info\sparse-checkout
4. git sparse-checkout reapply

Output:
git sparse-checkout reapply
warning: unrecognized negative pattern: '/A/B'
warning: disabling cone pattern matching
warning: unrecognized negative pattern: '/A/B'
warning: disabling cone pattern matching

Thanks! Chris



             reply	other threads:[~2023-04-04 12:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 12:00 Brown, Chris [this message]
2023-04-08 15:43 ` Negative patterns in cone mode Rudy Rigot
2023-04-08 21:52   ` Brown, Chris

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=GVXPR10MB8199D186532A7A285CCF1538B9939@GVXPR10MB8199.EURPRD10.PROD.OUTLOOK.COM \
    --to=chris.c.brown@siemens.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).