# Re: globs in partial checkout?

3 messages from 2006-12-10 to 2006-12-10. Participants: Michael S. Tsirkin, Linus Torvalds.
Thread: https://gitlist.dev/t/43602

## Michael S. Tsirkin, 2006-12-10 20:00

Subject: globs in partial checkout?
Message-ID: <20061210200029.GF1708@mellanox.co.il>
URL: https://gitlist.dev/e/20061210200029.GF1708%40mellanox.co.il
In-Reply-To: <e5bfff550612101151r5e77ddc0w8f61f36fc1f2920e@mail.gmail.com>

```
I'm trying to checkout some files after doing "clone -n".
Should using globs there work? It doesn't:

st@mst-lt:~/scm/wireless-dev$ git checkout master 'include/net/ieee80211*.h'
error: pathspec 'include/net/ieee80211*.h' did not match any file(s) known to
git.
Did you forget to 'git add'?
mst@mst-lt:~/scm/wireless-dev$ git ls-tree master -- include/net/ | grep iee
100644 blob b174ebb277a96668f058e469b0753503c34f164b include/net/ieee80211.h
100644 blob eb476414fd726701d032e9e517751b9d3f7e38df include/net/ieee80211_crypt.h
100644 blob 429b73892a5fc62f91e4a4b05da40859604fa791 include/net/ieee80211_radiotap.h
100644 blob 617b672b1132e7fa3ff5f9c940b1692520dc8483 include/net/ieee80211softmac.h
100644 blob 4ee3ad57283fa3370bd2d1f71cd6ae559b556dbc include/net/ieee80211softmac_wx.h
mst@mst-lt:~/scm/wireless-dev$ git checkout master include/net/ieee80211.h
include/net/ieee80211_crypt.h include/net/ieee80211_radiotap.h
include/net/ieee80211softmac.h include/net/ieee80211softmac_wx.h


-- 

```

## Linus Torvalds, 2006-12-10 20:13

Subject: Re: globs in partial checkout?
Message-ID: <Pine.LNX.4.64.0612101209370.12500@woody.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0612101209370.12500%40woody.osdl.org
In-Reply-To: <20061210200029.GF1708@mellanox.co.il>

```


On Sun, 10 Dec 2006, Michael S. Tsirkin wrote:
>
> I'm trying to checkout some files after doing "clone -n".
> Should using globs there work? It doesn't:

Not historically at all. "git checkout" needed exact filenames in older 
versions.

However, since about 1.4.4.1 or so, it now does the same filename 
expansion as "git add" etc does, which means that you can give it a 
directory name and it will check out everything under that directory, or 
you can give it a pattern, and it should glob it. But it sounds like you 
may have a slightly older version of git (the pathname matching really is 
fairly recent).


```

## Michael S. Tsirkin, 2006-12-10 21:07

Subject: Re: globs in partial checkout?
Message-ID: <20061210210713.GC9205@mellanox.co.il>
URL: https://gitlist.dev/e/20061210210713.GC9205%40mellanox.co.il
In-Reply-To: <Pine.LNX.4.64.0612101209370.12500@woody.osdl.org>

```
> However, since about 1.4.4.1 or so, it now does the same filename 
> expansion as "git add" etc does, which means that you can give it a 
> directory name and it will check out everything under that directory, or 
> you can give it a pattern, and it should glob it. But it sounds like you 
> may have a slightly older version of git (the pathname matching really is 
> fairly recent).

Seems like this was post-1.4.4.1. Just updated to 1.4.4.2 and this works for me now,
thanks.

-- 

```
