git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 15/16] checkout: add new options to support narrow checkout

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 17, 2008, 21:31 UTC
Message-ID
<200809172331.31972.jnareb@gmail.com>
In-Reply-To
<fcaeb9bf0809170649w418f4af5x3055c04994c694dc@mail.gmail.com>
On Wed, 17 Sep 2008, Nguyen Thai Ngoc Duy wrote:
> On 9/17/08, Jakub Narebski <jnareb@gmail.com> wrote:
Show 10 quoted lines
>>
>> Well, what I wanted to ask is if --remove-path starts from fully
>>  checked out repository, for example if
>>
>>   $ git checkout --remove-path=some_large_file
>>
>>  would checkout all files _except_ 'some_large_file'.
> 
> No, there is no negative spec. Like I said above, --remove-path is to
> remove some files based on the given spec.
So "git checkout --path/--add-path/--remove-path" is porcelain
interface to use (git-update-index is plumbing)?
 
Show 16 quoted lines
>>>>  And is <pathspec> matched against full pathname, or like .gitignore
>>>>  rules, i.e. as full pathname if it has at least one '/' in it?
>>>
>>> like shell wildcard, full pathname must match. On my way back home, I
>>> thought I should have removed mention of "pathspec", which behaves a
>>> little bit different.
>>>
>>> Also those specs are relative to working directory though, so if you
>>> are in b/c and want to match d, you only need to type --add-path=d
>>> instead of --add-path=b/c/d. Will add this to doc.
>>
>> I would have thought that you follow the same rules (perhaps with
>>  exception of !path excluding rule) like for gitignore and gitattributes.
> 
> Um.. never thought of gitignores/gitattributes rules before. It's a
> good idea all narrowspec/gitignore/gitattributes using the same rules.
Perhaps you would be able to even reuse some of implementation?...
-- 
Jakub Narebski
Poland
Previous: Nguyen Thai Ngoc Duy
Message 9 of 9 in “Re: [PATCH 15/16] checkout: add new options to support narrow checkout”
  1. Jakub NarebskiSep 15, 2008
  2. Nguyen Thai Ngoc DuySep 15, 2008
  3. Jakub NarebskiSep 15, 2008
  4. Nguyen Thai Ngoc DuySep 16, 2008
  5. Jakub NarebskiSep 17, 2008
  6. Nguyen Thai Ngoc DuySep 17, 2008
  7. Johannes SixtSep 17, 2008
  8. Nguyen Thai Ngoc DuySep 17, 2008
  9. Jakub NarebskiSep 17, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.